NPC Dialogue: Can't save or close code screen

Last updated: April 15, 2026

Students using the Code Builder to create NPC dialogue with choice trees may see a syntax error or get locked in the code screen, unable to save or close.

Symptoms

  • Student creates an NPC with dialogue following the tutorial steps
  • When they try to save and close, it either shows an error or locks them in the code screen
  • They have to delete their code (losing work) or restart the game
  • Error message may include "unexpected symbol near ')'"

Cause

The Code Builder dialogue blocks (DLG_CHCE and DLG_CHCE_TREE) don't properly wrap text values in quotes during save, producing invalid Lua code. This is also triggered when choice blocks exist without a parent DLG block — the generated code has an empty dialogC.Parent = line.

Workaround

  1. Make sure there is a main DLG (dialogue) block before any DLG_CHCE (choice) blocks
  2. If the student is already stuck, they may need to delete the dialogue code blocks and start over
  3. Start with a simple single-line dialogue to test, then add choices

Fix Status

Fixed in version 1.79DEV (Studio). Awaiting publish to live servers.

Was this article helpful?

Thanks for your feedback!