Is there a way I can view a specific line in the trigger editor?
I don't write my triggers in galaxy so I have the GUI activated and now the ingame error said "...near line 192 in trigger test...", but the trigger test doesn't have 192 lines, so I guess I need to view the source code for all the triggers at once or something. Or any other way to find line 192.
The first (and the best) way: Go to "file > preferences" in the editor. Under "Test Document", make sure that 'show trigger debugger' is enabled, as well as 'pause game on errors'. Now, whenever your error occurs, the game will pause, and the debugger will appear. You can see the exact line of code that your map is having an error on, as well as see some awesome information like call stacks, local and global variables, and more. You can press F5 to unpause the game and continue playing
The second (and more time consuming) way is to view your mapscript file. Go to "file -> Save as". Save your map as a components file instead of a map file. Navigate to the folder that was just created, open it, and find your mapscript.galaxy file. Even though it's a galaxy file, you can open it with any text editor (notepad or notepad plus plus for PC's, textedit for macs).
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
Is there a way I can view a specific line in the trigger editor? I don't write my triggers in galaxy so I have the GUI activated and now the ingame error said "...near line 192 in trigger test...", but the trigger test doesn't have 192 lines, so I guess I need to view the source code for all the triggers at once or something. Or any other way to find line 192.
There's actually two ways:
The first (and the best) way: Go to "file > preferences" in the editor. Under "Test Document", make sure that 'show trigger debugger' is enabled, as well as 'pause game on errors'. Now, whenever your error occurs, the game will pause, and the debugger will appear. You can see the exact line of code that your map is having an error on, as well as see some awesome information like call stacks, local and global variables, and more. You can press F5 to unpause the game and continue playing
The second (and more time consuming) way is to view your mapscript file. Go to "file -> Save as". Save your map as a components file instead of a map file. Navigate to the folder that was just created, open it, and find your mapscript.galaxy file. Even though it's a galaxy file, you can open it with any text editor (notepad or notepad plus plus for PC's, textedit for macs).