![]() |
BUG? float var within TStaticVar obj
I have been playing around with TStaticVar objects and one thing i noticed was assigning a float to a variable and trying to echo the var makes the NPC server crash.
NPC Code: NPC Code: Also assigning arrays to the object makes the NPC server crash. |
what if you just use
obj = new TStaticVar(); |
So with further investigation and suggestion from fp4 I have come to the following conclusion.
You maybe not have the same name for the object as the name in the "constructor". I havent went through all test cases which i dont think i will explore. This is just a rule of thumb in my book now. ex: obj = new TStaticVar("obj"); Begs the question, why would this have such a behavior? |
I don't know the technical reason, but when you make a GUI object. I.e.
PHP Code:
Also I think it would of worked fine if you used a temp. prefix instead of using a global variable. |
All times are GMT +2. The time now is 03:06 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.