<command name="EpadCommand">
<pattern>use epad</pattern>
<script>
msg ("Enter password")
get input {
if (result="1234") {
MoveObject (player, login)
}
else {
msg ("Incorrect password")
do(EpadCommand, "script")
}
}
</script>
</command>
Failed to load game.
The following errors occurred:
Error: Error adding script attribute 'script' to element 'EpadCommand': Invalid variable name ''
jaynabonne wrote:Would you be able to post the code view look at that command? It might be easy to spot the problem.
<command___SPACE___name = "EpadCommand">
<pattern>use epad</pattern>
<script>
msg ("Enter password")
get input {
if (result="1234") {
MoveObject (player, login)
}
else {
msg ("Incorrect password")
do (EpadCommand, "script")
}
}
jaynabonne wrote:That's it. I've never seen that __SPACE__ thing before. So I'm suspicious of that. Also, you didn't post the close tags for the script and command (</script> and </command>), so I'm not sure if those are there properly. If you could get rid of that so that it's just "<command name=..." and make sure there are correct closing tags, that might fix it. You might have to fix the close tag as well, if it got messed up somehow. It should be just </command>.
Failed to load game.
The following errors occurred:
Error: Error adding script attribute 'script' to element 'EpadCommand': Invalid variable name ''
jaynabonne wrote:What you can do to set it up via the GUI is to create the command with the GUI and maybe put a dummy "print message" command in the script to give the script a body. Then in code view, replace the script body with the one in my script. (I tend to do stuff like that myself.)
As far as what you have, I know you probably don't want to post your game file, but that should make it really easy to fix if you could get it to me somehow (either here or email). The error message is pointing to something strange. It might be something amiss downstream of the command. Even if you had misspelled "EpadCommand" in the "do" part, it should still load. I can't even munge my file to make it give that error (so far), so I don't know how to diagnose it.
One other thought: search the entire file for EpadCommand and make sure something with that text hasn't crept in elsewhere.
jaynabonne wrote:What you can do to set it up via the GUI is to create the command with the GUI and maybe put a dummy "print message" command in the script to give the script a body. Then in code view, replace the script body with the one in my script. (I tend to do stuff like that myself.)
As far as what you have, I know you probably don't want to post your game file, but that should make it really easy to fix if you could get it to me somehow (either here or email). The error message is pointing to something strange. It might be something amiss downstream of the command. Even if you had misspelled "EpadCommand" in the "do" part, it should still load. I can't even munge my file to make it give that error (so far), so I don't know how to diagnose it.
One other thought: search the entire file for EpadCommand and make sure something with that text hasn't crept in elsewhere.
jaynabonne wrote:What you can do to set it up via the GUI is to create the command with the GUI and maybe put a dummy "print message" command in the script to give the script a body. Then in code view, replace the script body with the one in my script. (I tend to do stuff like that myself.)
jaynabonne wrote:I never would have known that was it without looking. It's not really obvious that "do" translates to "Run object". (or vice versa)