SphereCommunity
error - Printable Version

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



error - Kapa - 10-12-2014 06:41 PM

Hi i keep getting this error
09:33:ERROR:(quest.scp,1286)Undefined symbol ''
this is the line 1286
IF <SRC.TAG.princess_help>=1

Script works fine even with the error.

[EVENTS e_notwellcome_burned]
ON=@NPCSeeNewPlayer
IF <SRC.TAG.princess_help>=1
SAY You pig you not wellcome In this City
ATTACK
endif


RE: error - Artyk - 10-12-2014 08:10 PM

With only one "=" you set the variable, so your IF will always be true, it should be

IF <SRC.TAG.princess_help>==1

That error happens sometimes when a variable isn't set before the IF.
You can use TAG0 instead of TAG, meaning that TAG gets value 0 if it isn't set


RE: error - Kapa - 10-13-2014 12:43 AM

Thanks Smile


RE: error - Kapa - 10-13-2014 05:28 AM

Any ideas? Smile sorry for being noob Smile

[SPEECH jobkingburn]

on=*helo*
on=*hello*
on=*hi*
on=*quest*
IF <SRC.TAG.kingburn_help>==1 /line1211
SAY You Betrade me. Die ! Guards!!!
ELSE
say <SRC.SEX Sir/Lady> Hey you! I am King Morgan Firebeard and I need your help.. say ~what~
return 1
endif


20:25:1:'qww' Says UNICODE 'ENG' 'hi' mode=0
20:25:ERROR:(quest.scp,1211)Undefined symbol ''


RE: error - darksun84 - 10-13-2014 05:35 AM

IF <SRC.TAG.kingburn_help>==1 /line1211

should be

IF <SRC.TAG0.kingburn_help>==1 //line1211


RE: error - Coruja - 10-13-2014 08:01 AM

you must use TAG0 instead TAG
if you use TAG (without 0) the script will return a empty text if the tag is not set. Using TAG0 it will return 0 to prevent the blank result

just translate the script and you will note the difference

example: if the TAG.A is not set, sphere will read the script line as it is:

IF (==1)

this will result a error because sphere doesnt know what is this empty string. If you use TAG0 it will return this

IF (0==1)

and this will work fine because sphere can read this line without problems