![]() |
Deleting 'player.' objects
So, I'm storing items as
HTML Code:
player.items.(id).(flag) = value; HTML Code:
player.items.(@ temp.id).clearvars(); However, when I'm reading the objects var names, it's still showing the item ID in the list HTML Code:
player.items.getdynamicvarnames(); HTML Code:
player.items.(@ temp.id) = ""; |
I actually had a similar problem yesterday but Tig helped me out.
Try setting it to "" first, and then doing clearemptyvars(); PHP Code:
|
Works a charm- you rock! Thanks =D
|
You can also do:
player.items.(@ temp.id) = new TStaticVar(); player.items.(@ temp.id).destroy(); Deletes the variable and all it's sub variables right there on the spot. You might have to do the player.items.(@ temp.id) = new TStaticVar(); before you add any subvariables to it though (which I always find is a good idea anyways if you are ever wanting to delete a mass of subvariables ever like so. |
I find the whole idea of Graal having subvariables like this.blah.blah2 without this.blah being an object is ridiculous and I avoid it at all cost.
|
Quote:
|
Great help the lot of you, thanks guys! :)
|
All times are GMT +2. The time now is 06:55 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.