SphereCommunity
Undefined symbol '' error - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Undefined symbol '' error (/Thread-Undefined-symbol-error)



Undefined symbol '' error - Oxtar - 12-17-2012 08:32 AM

Well i've been wondering why i keep getting this error into Sphere.

Undefined symbol ' '

Quote:ON=@EquipTest
if (<SRC.TAG.Heaven>==0)
SRC.SYSMESSAGE You are not from the Heaven Faction!
return 1
endif

Someone could tell me what is wrong?

EDIT :

The IF line is the one getting reported in Sphere Console


RE: Undefined symbol '' error - darksun84 - 12-17-2012 08:55 AM

You should use the format src.tag0.heaven

Tag stores string type variables, so if tag.heaven is empty, the if will compare 0 to an empty string and then causing the error.

Instead by using the format tag0.heaven, sphere will automatically consider every empty tag as having a value of 0. (same for VAR ).


RE: Undefined symbol '' error - Oxtar - 12-17-2012 09:27 AM

You are right.

I wonder how i missed that one.

You know, when you are looking at the same code over and over for a couple of days? haha