Bennytheowl Posted January 21, 2016 Author Share Posted January 21, 2016 It's gibberish to me because I don't understand the error. I've literally just used the script provided with name changes. scriptname OTWACScriptTravel1int iButtonbegin OnActivate if IsActionRef Player ; only run if activated by the player showmessage OTWACtravelBox ; message should contain buttons! they correspond with conditionds below. endifendifbegin menumode set iButton to GetButtonPressed if iButton == 0 ; if player pushes button#0 PlayerRef.Moveto OTWACMarker1REF ; player gets teleported to marker endifend Link to comment Share on other sites More sharing options...
Ladez Posted January 21, 2016 Share Posted January 21, 2016 A begin-block must always end with an accompanying end-statement. Tomm mistakenly ended the first begin-block with endif, which must be used only for ending an if-block. Incorrect: begin onActivate ; do stuff endif Correct: begin onActivate ; do stuff end If you're wondering which ends/endifs goes with which begins/ifs, the rule is that any begin- or if-statement ends when the first end- or endif-statement is encountered. It also helps if the code is properly indented, as the examples here are. Link to comment Share on other sites More sharing options...
TommInfinite Posted January 22, 2016 Share Posted January 22, 2016 (edited) Never mind. Edited January 22, 2016 by TommInfinite Link to comment Share on other sites More sharing options...
Bennytheowl Posted February 14, 2016 Author Share Posted February 14, 2016 A begin-block must always end with an accompanying end-statement. Tomm mistakenly ended the first begin-block with endif, which must be used only for ending an if-block. Incorrect: begin onActivate ; do stuff endif Correct: begin onActivate ; do stuff end If you're wondering which ends/endifs goes with which begins/ifs, the rule is that any begin- or if-statement ends when the first end- or endif-statement is encountered. It also helps if the code is properly indented, as the examples here are.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts