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

Choices without body text will cause errors #33

Closed
seleb opened this issue Oct 30, 2021 · 0 comments · Fixed by #41
Closed

Choices without body text will cause errors #33

seleb opened this issue Oct 30, 2021 · 0 comments · Fixed by #41

Comments

@seleb
Copy link
Contributor

seleb commented Oct 30, 2021

Example:

start:
  - choice:
    - "a":
      - text: "a response"
    - "b":
      - text: "b response"
    - "c":
      # no response for c
  - text: generic response

Having a choice like this can be useful for pacing/"illusion-of-choice" style choices that don't actually do anything specific, but currently they will error out if selected.

Known workaround: You can put something unnecessary like a variable declaration in the choice body so that it doesn't error out, and continues to the rest of the scene, e.g.

start:
  - choice:
    - "fake choice":
      - var null: null
  - text: generic response
seleb added a commit to seleb/RenJS-V2 that referenced this issue Oct 30, 2021
fixes lunafromthemoon#33

includes an empty array as choice actions if there are none when parsing to avoid errors downstream
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

Successfully merging a pull request may close this issue.

1 participant