View Single Post
Old 05-10-2002, 09:47 PM   #9
Serge
SCUMMLord
 
Join Date: Mar 2002
Location: Denmark
Posts: 196
The curly brackets are in SCUMM too:
Code:
if (current-actor == guybrush) {
  sayline guybrush "Hi! I'm the current actor!"
} else {
  blast-text at 320,50 "We locked Guybrush inside a box. 
    He tends to get too much attention!"
}
And the most obvious way to get rid of the minus ambiguity turns the example script into this:
Code:
  SleepFor 50 Jiffies
  SayLine guybrush "/CYGT308/Well Murray, are you ready 
    to continue our heady adventuring?"
  WaitForMessage
  SleepFor 30 Jiffies
  SayLine guybrush "/CYGT309/Murray?"
  WaitForMessage
waitingloop1:
  actor guybrush turn 225
  WaitForActor guybrush waitingloop1
waitingloop2:
  actor guybrush turn 135
  WaitForActor guybrush waitingloop2
  SayLine guybrush "/CYGT310/Where'd he go?"
i.e., simply disallowing minuses in variable names, command names etc.

- Serge
Serge is offline   you may: quote & reply,