Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   new TServerPlayer() and a few bugs (https://forums.graalonline.com/forums/showthread.php?t=134258328)

DustyPorViva 03-10-2010 08:53 AM

new TServerPlayer() and a few bugs
 
First off, it's case sensitive. This is a bad thing. Especially since the player tends to be offline, there is no way to get the proper case for their account.

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.

Skyld 03-10-2010 12:17 PM

Quote:

Originally Posted by DustyPorViva (Post 1561561)
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.

Loriel 03-10-2010 02:35 PM

Quote:

Originally Posted by Skyld (Post 1561579)
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.

You are all crazy

WhiteDragon 03-10-2010 05:44 PM

Quote:

Originally Posted by Loriel (Post 1561591)
You are all crazy

Quoted for truth.

Admins 03-11-2010 02:00 PM

The "new" operator is special because of compatibility reasons, eventually that can be dropped sometime though. Right now it's forcing the argument to be a string, if you write (myvar) then it's using it as "myvar" instead of retrieving the value of myvar.

DustyPorViva 03-11-2010 09:29 PM

Quote:

Originally Posted by Stefan (Post 1561832)
The "new" operator is special because of compatibility reasons, eventually that can be dropped sometime though. Right now it's forcing the argument to be a string, if you write (myvar) then it's using it as "myvar" instead of retrieving the value of myvar.

What about the case sensitivity?


All times are GMT +2. The time now is 01:45 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.