Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   The No-Where Variable! (https://forums.graalonline.com/forums/showthread.php?t=70344)

Novo 11-23-2006 11:13 PM

The No-Where Variable!
 
PHP Code:

//#CLIENTSIDE
function onCreated()
  {
  
player.tv = {1,2,3};
  
this.var = new TStaticVar();
  echo( 
this.var.tv ); // returns 1,2,3
  
echo( this.var.tv.size() ); // returns 0
  
echo( this.var.tv ); // returns 0
  


=]

Admins 12-07-2006 01:13 PM

Strange problem.
I would say it's not finding this.var.tv and then wrongly getting another tv var. Once you call tv.size() it is creating this.var.tv and everything is fine.
When you have a variable name without leading ("tv") then it is also checking for player.tv on clientside, for compatibility with old scripts since setstring tv,123; is actually setting player.tv. In this case it should not check for "tv" since it is this.var.tv, will try to fix that.

Update: ok fixed this in my Graal version and in the npcserver, so with the next release of those the bug should be fixed. Thanks for reporting it, it can probably be a quite big problem in some cases.


All times are GMT +2. The time now is 08:00 PM.

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