Community
SCI Programming => Mega Tokyo SCI Archive => Topic started by: HMS on September 25, 2004, 03:22:38 PM
-
Im sitting whidt this code from the tutorial:
(var button)
= button Print(
"Do you want to click Yes or No?"
#title "Click What?"
#font LARGE_FONT
#icon 0 0 0
#button " Yes " 1
#button " No " 0
)
(if(== button 1)
Print("You clicked YES")
)(else
Print("You clicked NO")
)
BUT it aint work!
It comes whitd followring errors:
Undefined Symbol "var"
why??
-
where did you put (var button)?
-
(if(Said('look'))
Print("You are in your beed room")
)
HERE
)
)
-
yeah...thats the problem - define the variable like this:
(method (handleEvent pEvent)
(var button)
then put the (if(Said('blah'))
= button Print("Blah")
-
THANKS
-
!!!
There is a new problem!!
Its come again and again how do i stop it?
-
i put this into a game and it didnt keep popping up: what code did you use and does it image what ive got here?
(method (handleEvent pEvent)
(var dyingScript, button)
(super:handleEvent(pEvent))
(if(Said('eat/pig'))
= button Print(
"Do you want to click Yes or No?"
#title "Click What?"
#font LARGE_FONT
#button " Yes " 1
#button " No " 0
)
(if(== button 1)
Print("You clicked YES")
)(else
Print("You clicked NO")
)
)
)
-
hmm i fixed the problem by going to another room.