View Full Version : Delete qglobals when delete char?
thepoetwarrior
08-01-2009, 08:59 PM
So far I've now seen twice that someone made a new char and got some qglobal "flags" that I use for entering raid zones etc.
Only thing I can think of is that maybe someone got flagged for a zone, or quest complete etc, then deleted their char, and someone else made a char with the same name.
Can someone verify if qglobals for the character get deleted when a character is deleted?
joligario
08-01-2009, 10:46 PM
Globals do not go by name, but by character id which autoincrements. When you delete a character, it does delete their globals. I just tested this out. So most likely the problem is with a script that doesn't undefine or sets the global wrong.
thepoetwarrior
08-02-2009, 02:51 AM
Thanks much!!!!
trevius
08-02-2009, 03:08 AM
Yeah, that issue will happen if you are using the old $globalname way instead of the $qglobals{globalname} way when checking globals. It is because the old way would set them like a variable, so if they weren't cleared out after one person set the variable by passing the if check, then the next person to try it might pass the if check automatically if they don't have that qglobal defined yet. Then, if it is setting a new qglobal after the if check happens, the newbie just got a free pass that they shouldn't have gotten.
If you want to post the script you are having this problem with, it shouldn't be too hard for us to adjust it so this doesn't happen again for you. Took me a bit to fully understand the qglobal system, but once I got it, it made correcting issues like that much easier.
KingMort
08-02-2009, 10:23 AM
When you delete a char it not only takes out the persons Globals but it also takes out their factions.. And also of course the inventory..
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.