Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-11-2008, 09:25 AM
Knight Knight is offline
Banned
Join Date: Sep 2007
Location: United States
Posts: 230
Knight will become famous soon enough
Send a message via MSN to Knight
Removing a variable from DB

When you have a database that holds a bunch of different variables (dynamics in my case) and you take one of the variable values and you set it to NULL, it takes the value of the var and sets it to NULL, but the variable itself still remains. The same is true if you use
DBName.variablename.clear();
and
DBName.variablename = "";

Does anyone know of a surefire way to remove a variable from a database NPC? There are ways such as using = ""; to make it appear as though the variable has been deleted (because variables with this value are not displayed in the NPCdump for that DB) when infact they still remain.

Thanks for the help!

- Knight
Reply With Quote
  #2  
Old 07-11-2008, 11:25 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I'm pretty sure they are non-existant when being set to nil, since the ones set to nil, NULL, 0 or false won't be shown anymore after an NPC Server restart.
__________________
Reply With Quote
  #3  
Old 07-11-2008, 12:38 PM
Dan Dan is offline
Daniel
Join Date: Oct 2007
Posts: 383
Dan is an unknown quantity at this point
Send a message via MSN to Dan
PHP Code:
function onCreated() {
  
this.myvar "";
  
this.myvar.clear();
  echo(
this.getdynamicvarnames());

Output: myvar,onCreated

I have shown Stefan and I believe all he said was ' insert nothing here '.
__________________
Reply With Quote
  #4  
Old 07-11-2008, 04:12 PM
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
Well you can do clearemptyvars() but normally it should remove it anyway when you do var = "" or similar, will need to check it.
Reply With Quote
  #5  
Old 07-12-2008, 06:54 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Dan View Post
PHP Code:
function onCreated() {
  
this.myvar "";
  
this.myvar.clear();
  echo(
this.getdynamicvarnames());

Output: myvar,onCreated

I have shown Stefan and I believe all he said was ' insert nothing here '.
As in '' like null character?
__________________
Do it with a DON!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:22 AM.


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