I would quite like it if you spaced the operator out a bit, i.e.
PHP Code:
res = one @ two;
Instead of...
Note that you can also use
SPC and
NL operators, the former inserting a space and the latter inserting a new line (effectively, a "\n"), i.e.
PHP Code:
one = "Doris";
res = "Hello" SPC one;
... producing "Hello Doris!".
Quote:
|
Originally Posted by prozac424242
If, instead of the player's name, you want to put in a player variable or a server string, #s(client.whateveryoucalledthestring) and #s(serverr.thestringnameyougavefortheserverstring) still works.
|
This is bad:
PHP Code:
res = "My my, " @ #s(clientr.stringname);
You would use the following:
PHP Code:
res = "My my, " @ clientr.stringname;
Please do not mix old gscript and gscript.
Quote:
|
Originally Posted by prozac424242
Also, if you have a Gui box whose text you want updated, having any kind of setTimer(number) will casue the text to flash. .05 time casues the text to not show at all, if read from a server string, if I remember correctly the server's fastest response time is .1, so in the timeout, do a check that grabs the string value to a variable, sleep for .1, and check the variable against the current string value. If the values differ, then update the text attribute of whatever you called the box. The text attribute for GuiTextCtrl ("My_Text") would be My_Text.text and you can set it equal to whatever you like in a separate part of the npc.
|
And if you are not updating the text every 0.1 seconds, then this is throughly bad practise and you should use approximately more events!