Use the code editor
The code editor is the tabbed text editor of the in-game editor. Script files and JSON files open here when you click them in the explorer.
Tabs
Each open file is a tab. Switch with a click, and close a tab with its close button. Your work is kept per tab while the editor is open.
Editing
- The editor highlights Groovy and JSON syntax.
- Errors you type are marked on the offending line as you go.
- Use Go to Line (or click an error in the Problems panel) to jump to a specific line. Line numbers start at 1 in the gutter.
Saving
Save after you change a script. Until you save, the file on disk is unchanged. After saving, the change is picked up by a reload.
Related
- Finding errors: Validate your scripts.
- Files on disk: Use the explorer.