Author Topic: Undefined Symbol "var"  (Read 504 times)

0 Members and 1 Guest are viewing this topic.

HMS

  • Guest
Undefined Symbol "var"
« 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??




Offline Doan Sephim

Re:Undefined Symbol "var"
« Reply #1 on: September 25, 2004, 03:42:51 PM »
where did you put (var button)?

HMS

  • Guest
Re:Undefined Symbol "var"
« Reply #2 on: September 26, 2004, 04:33:31 AM »
        (if(Said('look'))
            Print("You are in your beed room")
        )
     HERE
    )
)

Offline Doan Sephim

Re:Undefined Symbol "var"
« Reply #3 on: September 26, 2004, 09:45:03 AM »
yeah...thats the problem - define the variable like this:
(method (handleEvent pEvent)
        (var button)
then put the (if(Said('blah'))
                  = button Print("Blah")


« Last Edit: September 26, 2004, 09:52:49 AM by doan sephim »
Artificial Intelligence Competition

HMS

  • Guest
Re:Undefined Symbol "var"
« Reply #4 on: September 26, 2004, 10:04:09 AM »
THANKS

HMS

  • Guest
Re:Undefined Symbol "var"
« Reply #5 on: September 26, 2004, 10:09:57 AM »
!!!

There is a new problem!!

Its come again and again how do i stop it?

Offline Doan Sephim

Re:Undefined Symbol "var"
« Reply #6 on: September 26, 2004, 10:24:46 AM »
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?
Code: [Select]
(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")
            )
        )
)

HMS

  • Guest
Re:Undefined Symbol "var"
« Reply #7 on: September 27, 2004, 08:14:10 AM »
hmm i fixed the problem by going to another room.



SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.061 seconds with 22 queries.