Closed masterxodin closed 10 years ago
Thanks for this, we should definitely add an example to make it clearer.
The documentation for System.writeChoices
says that it takes a list of ids, and the choices
option in SimpleSituation
does the same. So for now, you should be able to change
choices: "#shipboard"
to
choices: ["#shipboard"]
i.e. give it a list.
I haven't tested it on the code you gave, but I'm closing this issue, please reopen it if it doesn't solve your problem.
I'm running in to an issue creating a Choices menu on a simpleSituation. I know my syntax is wrong, but neither the documentation nor the tutorial have any examples of the proper syntax to use when adding choices to a simpleSituation in the js file.
This is what I've written:
At the moment this returns an assertion error. Uncaught function (message) { this.message = message; this.name = AssertionError; }: You can't move to an unknown situation: s.
The documentation http://undum.com/doc/implicit.html offers a lot of info on how to generate choices, but offers no examples of choices: or System.writeChoices or System.getSituationIdChoices in use in an actual simpleSituation, and the tutorial doesn't use them either (every situation that uses them is in the html file instead of the js file). So unfortunately, I have nothing to compare against to figure out the errors in my syntax. Could anyone show me an example of how the coding for generating choices is supposed to look like in the js file when adding them to a simpleSituation?