View Single Post
  #2  
Old 03-10-2010, 12:17 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DustyPorViva View Post
Secondly, it seems it does not properly support variables:

temp.pl = new TServerPlayer("DustyPorViva");
Works.

temp.a = "DustyPorViva";
temp.pl = new TServerPlayer(temp.a);

Does not.

temp.a = "DustyPorViva";
temp.pl = new TServerPlayer((@temp.a));

Does work, however.
This is more than likely intended behaviour. If you pass it a plain variable, you are telling GScript that you want it to instantiate in temp.a, which is precisely the same way that you can instantiate GUI controls. Using (@ temp.a) is forcing a string to be returned.
__________________
Skyld
Reply With Quote