Source language: Translate to:

Cant undefine a variable

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Cant undefine a variable

Postby HackinHoodLogicsTm » Mon Feb 06, 2017 3:17 am

Please i need help.
I have defined a Date Variable. As follows

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
DefineVar "[1st]" "Date" "mm/dd/yyyy" "Global" "[MonthNum]"/01/[Year]"
 
Parsed in 0.005 seconds, using GeSHi 1.0.8.10


The above code works fine..
Now i want to undefine the "[1st]" variable and define another date variable into it.

This is how i undefine varaiable "[1st]"
ClearVariable "[1st]"

Then i get this error
"" is not a valid date value.

Please i need your help on this.
Thanks
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Cant undefine a variable

Postby Gaev » Mon Feb 06, 2017 6:44 am

HackinHoodLogics:

From the Help file ...
In order to delete a variable created with DefineVar, you must first re-declare the variable as “Undefined”, then clear it with SetVar. For example:

DefineVar "[Birthdate]" "Undefined" "" "Global" ""
SetVar "[Birthdate]" ""
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Cant undefine a variable

Postby HackinHoodLogicsTm » Mon Feb 06, 2017 8:10 am

Thanks...that works
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron