Blockland Forums > Modification Help

Is there something for if(isVariable(%var))?

Pages: (1/2) > >>

mp7964:

I need to check if the variable exists, is there an if(is statement for that?

jes00:

Not that I know of.

Vars are blank by default so you could probably do if(%var !$= "") to check if the var is not blank.

mp7964:


--- Quote from: jes00 on January 17, 2012, 07:30:17 PM ---Not that I know of.

Vars are blank by default so you could probably do if(%var != "") to check if the var is not blank.

--- End quote ---

Mmkay.

jes00:


--- Quote from: mp7964 on January 17, 2012, 07:33:19 PM ---Mmkay.

--- End quote ---
Did it work?

Nexus:


--- Quote from: jes00 on January 17, 2012, 07:30:17 PM ---Not that I know of.

Vars are blank by default so you could probably do if(%var != "") to check if the var is not blank.

--- End quote ---

do !$=

!= only works with numbers

strings are more flexible

Pages: (1/2) > >>

Go to full version