Troubleshooting
The TrigScript window stays on "Loading the editor…". The first time it opens, it downloads the code editor and TypeScript from jsDelivr, so it needs an internet connection once. After that the browser keeps them.
The status bar shows a red problem count. Click it to open Problems, and click a problem to go to its line. While the script has an error, saving still works: the map keeps the triggers from the last script that worked, and a notice names the file and line.
The status bar says "Not applied yet" or "Changes not applied". The script's triggers in the map are older than the script. Saving or testing the map applies it, or press Apply (Ctrl+Shift+B).
The status bar says "Triggers edited outside the script". Someone edited the script's triggers in the Trigger Editor or the Text Trigger Editor, and saving does not apply the script until that is settled. Click the item and choose Apply or Append instead; see Triggers edited by hand.
A notice says the map renamed something the script names. A location or switch was renamed on the map. Update references changes the script to match.
The programs are not built. Look at the status bar of the TrigScript window:
- built by TrigScript: the programs are built by TrigScript itself on every save. If the game shows nothing, the Output panel has the last build's lines, and Problems may name a line.
- Build failed or Saved without its programs: the map was saved with the script in it, but its programs do not run in the game. Show the log on the notice, or the Output panel, says why. Fix the error and save again.
A map with a program does not start in the game. Programs need StarCraft: Remastered.
For the classic game (1.16.1), use only trigger().
Nothing happens in the game. Check that the game type is Use Map Settings: melee games ignore the map's triggers. Check that the trigger's players are in the game, and see the trigger reference for owners the game never runs. The Trigger Map plugin shows which triggers can never run.
A typed line does nothing. A single-player game has no chat. Host a multiplayer game, alone if you like.
Simulate or a test never sees an enemy die. The simulator does not fight. In a test,
kill the units with sim.kill(unit).
A test fails with "still not true after 2400 frames". The condition given to
sim.until() never became true. Give until a larger limit as its second argument, or
check the script with Simulate.