Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZAPing to an undefined step breaks NPC #31

Closed
jrbudda opened this issue Jul 5, 2012 · 4 comments
Closed

ZAPing to an undefined step breaks NPC #31

jrbudda opened this issue Jul 5, 2012 · 4 comments

Comments

@jrbudda
Copy link
Contributor

jrbudda commented Jul 5, 2012

I accidentally left a ZAP in the last step (step 2) of a script. Afterwards the NPC would not work at all even if I removed him and recreated him, reloaded the server, etc.
Finally found the Current Step line in the saves.yml. It was set to 3, only by deleting this line and reloading was I able to make him work again.

Would it be possible for ZAP only to work if the specified step is defined?

@aufdemrand
Copy link
Contributor

Yes, absolutely. The new build I'm working on breaks commands down into little 'modules' (requirements are next), so that things like error handling can be implemented nicely. You'll see a lot better handling of errors in newer builds, or at least an attempt to put that in place. I haven't specifically checked for that, but I will. That's a good idea, and fits in with the behavior of the error checking that's being put into place: 'If your script is wrong, error out with information.' I think it will be better in the long run. The alternative was, 'If your script is wrong, do the command with as much information as possible, even with an error.' My fear is that would cause potentially running unintended commands, which could be bad (and confusing).

@jrbudda
Copy link
Contributor Author

jrbudda commented Jul 5, 2012

Oh awesome. Haha a simple 'I'm working on it" would have sufficed. :)

But yea that sounds great, kludging the YAML now does make for a messy, messy stack trace.

@aufdemrand
Copy link
Contributor

:)

@aufdemrand
Copy link
Contributor

Nice little warning now in debug mode if you attempt this. Decided not to completely disable since it could be used to an advantage in special circumstances.

mcmonkey4eva added a commit that referenced this issue Aug 6, 2015
Update Contexts. (Entity, World + 1 Player [xenmai got no clue how to])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants