Skip to reading
Error Handling & Debugging

Follow a script error to its source

Edition 0.86.4.4 Hotfix 2

Updated through 0.86.4.4 Hotfix 2, with cinematic property, recorded-pose or voice-timing lessons as described in this guide. Earlier examples, screenshots and complete registry figures retain their stated edition context.

Download PDFView illustrations

SCRIPT VALIDATION

A script validator reads what you wrote and checks what it can recognize. Start with the earliest relevant message. A missing quote or block ending can make several later lines look wrong.

PCA Script identifies line 5, the unrecognized inventory ID celx, and Power cell [cell] as a possible match.

Code example
give celx to player

The author intended to give the player the Power cell. Opening the inventory record confirms the stable ID is cell. Change the statement to give cell to player and validate the script again. A suggestion is worth checking against the intended item, especially when several items share a similar name.

The BASIC Designer reports a missing END FUNCTION. The opening FUNCTION can be correct while the mistake is at the bottom of the block.

Source table from Follow a script error to its source, page 6
PCA ScriptUse the script toolbar’s Validate button. Activate a diagnostic entry to jump to the source line. Go to Record and autocomplete can help confirm an authored ID.
BASIC, Lua or GDScriptUse Validate in that language’s designer. Fix the reported syntax, validate again, apply the edit and save your project. Only then repeat the gameplay action.

A clean report means the checks that ran passed. A perfectly legal comparison can still produce the wrong story outcome. The two-ticket case on page 10 shows exactly how.

Page 6 of 37Permalink
Go to page