Jump to content

Error with "Scripting Tutorial: My Second Script"


vanblam

Recommended Posts

LOL I know this is probably a noob question but why is this not working I copied exactly what he said to do and I get 4 errors.

 

This is the Link to the Tutorial page.

 

http://cs.elderscrolls.com/constwiki/index.php/Scripting_Tutorial:_My_Second_Script

 

 

 

 

This is the script I copied from that tutorial:

 

ScriptName RiddleChestScript

 

Short controlvar

Short button

 

Begin OnActivate

If ( controlvar == 0 )

MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless

mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

Set controlvar to 1

ElseIf ( controlvar > 1 )

Activate

EndIf

End

 

Begin GameMode

If ( controlvar == 1 )

Set button to GetButtonPressed

If ( button == -1 )

Return

ElseIf ( button == 2)

MessageBox "Your answer was correct."

Activate

Set controlvar to 2

Else

MessageBox "Your answer was wrong."

Set controlvar to -1

EndIf

EndIf

End

 

After I try to save that I get 4 errors saying

 

 

Script 'RiddleChestScript', line 8:

Unknown variable or function 'What'.

 

 

Script 'RiddleChestScript', line 8:

Syntax Error

 

mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

 

Could not parse this line.

 

 

Script 'RiddleChestScript', line 6:

Mismatched begin/end block starting on line 6.

 

 

 

Script 'RiddleChestScript', line 6:

Mismatched begin/end block.

 

 

Was the script code changed sense this tutorial from a patch?

 

Thanks for any help :)

Link to comment
Share on other sites

    MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

 

is supposed to be

 

    MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

 

The tutorial used two lines for it because the wiki page isn't wide enough to put the whole thing on one line.

Link to comment
Share on other sites

    MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless
mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

 

is supposed to be

 

    MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith"

 

The tutorial used two lines for it because the wiki page isn't wide enough to put the whole thing on one line.

 

O I C... Thanks a lot :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...