I get an error message saying: declaration script is not permitted inside a script. Perhaps my script has an extra...
The message "declaration script is not permitted inside a script. Perhaps my script has an extra begin (or perhaps there is an extra end) earlier in the file" may have several meanings
- A line of code with a end in it is missing (so there is an extra beginning)
- A line of code with a begin in it is missing (so there is an extra ending)
- The word begin (or end) is incorrectly spelled
The error means that hspeak.exe can't see where the plotscript ends (or starts). To solve this problem you MUST find where the problem in code is. To do so, be sure you use hseed.exe or notepad++ or any other program that give you the number of lines for you hss file(s).
To prevent this error from happening, I strongly recommend you to user consistent indentation and put a comment near your ends so that you know if you can delete it or not when you modify your code.
Here is an example with a script from Moogle's library
script,check for finished codes,begin
if(L1==key:S,and,L2==key:P,and,L3==key:A,and,L4==key:M) then, begin
reset code
# trigger the magical SPAM password!
show text box (370)
wait for text box
enter hq code := false
end #end for if(L1==key:S,and,L2==key:P...
if(L1==key:Q,and,L2==key:U,and,L3==key:I,and,L4==key:T) then,begin
reset code
# end the game
game over
end #end for if(L1==key:Q,and,L2==key:U...
reset code
end #end of the plotscript
Remember that there are two main ways to write "end" : you can write it end or ) and two ways to write "begin": you can write it begin or (. As you can notice, it is more difficult to realize that parenthesis are missing.