![]() |
Client strings
I have noticed that with the new scripting engine enabled, it is not possible to have a client. or clientr. string that is equal to "0".
For example, "clientr.mp=0" in Attributes will simply remove "clientr.mp" from the list of client strings, making it hard for some GUI scripts to show the correct information. I think this is probably because the new engine returns a non-existent string as 0. Could this be fixed? |
Could you do clientr.mp = "0" making the value a character rather than an integer?
|
No, that does the same thing. :confused:
|
PLEASE change this
we don't like it either on Classic right now our gui does something like this showtext x,y,,,#v(strtofloat(#s(clientr.bombs))); |
Yes you need to use strtofloat if you want to make sure it is a number, there is no way to avoid that. It is really needed for compatibility with old Graal script:
set varname; -> translated into varname = true; -> varname = 1; unset varname; -> translated into varname = false; -> varname = 0; -> var is removed In old Graal script the if (varname) command is just checking if the variable is existing, not if the value is non-zero. So to make unset work correctly it needs to remove the variable. This is also very nice for removing data that is not needed anymore, just set it to zero or empty string for removing it. |
| All times are GMT +2. The time now is 06:27 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.