Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-26-2005, 07:36 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
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?
__________________
Skyld
Reply With Quote
  #2  
Old 02-26-2005, 07:39 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Could you do clientr.mp = "0" making the value a character rather than an integer?
__________________
Liek omigosh.

Reply With Quote
  #3  
Old 02-26-2005, 07:45 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
No, that does the same thing.
__________________
Skyld
Reply With Quote
  #4  
Old 02-26-2005, 10:22 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
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)));
__________________

Reply With Quote
  #5  
Old 02-27-2005, 04:21 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:19 AM.


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