Skip to content

Debugging and Testing mods or game scripts

Robosturm edited this page Jul 14, 2022 · 2 revisions

Debbuging and testing

You can press F1 to take a look at the ingame console. It will show you any failures that occured during the execution of your script including line at which an error occured.

You can print information about the execution of your script printing information to the console. Example:

GameConsole.print("This shouldn't happen", 1);

The printed information can be viewn in the game by pressing F1.

Another option is to open the console and call a function directly to test it leading the command with game: for example:

game:game.getMap().getPlayer(0).getCO(0).setPowerFilled(10)

This would set the power bar of the first co of the first player to 10 stars or the maximum if it's smaller.

Clone this wiki locally