Guide:Troubleshooting
This is a list of errors that can occur when creating Custom Levels, and troubleshooting steps found by the community to solve them.
Error messages are displayed on the gamelog and ingame console.
The gamelog.txt file is found in %userprofile%\AppData\LocalLow\Phobia\Carrion.
Reading the Gamelog
Initializing
The first part of a gamelog usually includes:
- Game version
- System information
- Display settings
- Audio settings
- "Welcome to MONSTER" ASCII art
W E L C O M E T O
__ __ ______ __ __ ______ ______ ______ ______
/\ "-./ \/\ __ \/\ "-.\ \/\ ___\/\__ _\/\ ___\/\ == \
\ \ \-./\ \ \ \/\ \ \ \-. \ \___ \/_/\ \/\ \ __\\ \ __<
\ \_\ \ \_\ \_____\ \_\\"\_\/\_____\ \ \_\ \ \_____\ \_\ \_\
\/_/ \/_/\/_____/\/_/ \/_/\/_____/ \/_/ \/_____/\/_/ /_/
Loading a level
When loading a level, the gamelog prints out how much time it took to execute each step. The level name is displayed at the top, and errors that happen when loading a level will appear right after this section.
Physics initialized.
Loading level: lab
|- Initializing humans and monsters...
| 1.2961 ms
|- Parsing level file...
| 32.5317 ms
|- Cleaning up tile layers...
| 0.0369 ms
|- Reading level properties...
| 8.1301 ms
|- Filling up tile layers...
|- Tile gen. threads: 0.0220266 s
|- Tile gen. threads: 0.000286 s
| 63.9869 ms
|- Placing objects...
| 38.7984 ms
|- Finalizing...
'- Done. Total elapsed time: 144.8273 ms
Loading scripts...
Executing...
Physics thread started.
Loading a chamber
The time it takes to load a chamber is saved on the gamelog. If an error happens when entering a chamber, it will appear after a section like this one.
Layer generated in: 0.0118737 s, 12 threads.
Layer generated in: 0.0148126 s, 12 threads.
Render target pool stats
|- 256 x 256: used: 12 allocated: 12
|- Approx. pool size in VRAM [MiB]: 3
'- Done. Total elapsed time: 0.0863 ms
Errors
Errors that do not crash the game, but may stop certain parts of the .cgs script from working.
Variable not found
[Line X]: Variable not found: X.
Known causes: Mismatched or non existent variable name.
Solution: Make sure the variable name matches an existing one.
Unexpected character
Error at [Line]: Unexpected character: 'X'
Known causes:
- Misspelled or non existent variable name.
- Forgotten semicolon.
- Syntax error.
Solution: Fix the typo.
Concave shapes are not supported
Concave shapes are not supported yet.
Known causes: A concave Morph shape exists in the level.
Solution: Use convex shapes instead.
Crashes
Errors that crash the game.
Level doesn't exist
ERROR: Level doesn't exist: 'X'
Known causes: Misspelled or non existent level name when using console commands or through .cgs scripts.
Solution: Fix the typo, and make sure the level name matches an existing level.
Key not present in dictionary
The given key 'X' was not present in the dictionary.
Known causes: Misspelled or non existent texture name.
Solution: Fix the typo, and make sure the texture name matches an existing texture.
Unsupported object type for layer
Unsupported object type for layer [X].
Known causes:
- Element of a certain type in the wrong layer (e.g. a switch in the Lights layer).
- Object with a misspelled or non existent
Typeproperty.
Solution: Make sure every object is in its proper layer, and double-check the properties of recently placed objects.
Wrong template path
Wrong template path: ../../../Content/Templates/ [...]
Known causes: Copying an object with a template that comes from a different level, with a different Templates folder.
Solution: Replace the object with one from the current level's Templates folder, or edit it directly on the level's JSON file.
Object reference not set
Object reference not set to an instance of an object.
Known causes: An object has been placed outside the map or chamber boundaries.
Solution: All objects must be inside chambers and the map.
Arithmetic operation in overflow / Divide by zero
Arithmetic operation resulted in an overflow.
Attempted to divide by zero.
Known causes: Usually happens when an obstacle is smaller than 1 tile (16/16 px).
Solution: All obstacles must be at least 1x1 tile.
Index outside bounds
Index was outside the bounds of the array.
Known causes:
- Human falling out of bounds.
- The property
DefaultFloorof an Elevator being a number greater than 1. - The property
Modeof a Door being a number greater than 1. - The property
Depthof a Monster being a number greater than 20, when Parasitism fails to activate.
Solutions:
- Ensure all enemies stay in bounds.
- Avoid going over each property's max amount.
Save file not found
ERROR: Save error: Save file not found: [X]
Game state corrupted or incompatible: Save file not found: [X]
Known cause: Trying to load a save file that doesn't exist.
Crashes with Empty Gamelog
Errors that crash the game, and don't output an error message to the gamelog.
Wrong tileset path
Cause: Loading a level with one or more tiles placed using a different project's tileset.
Solution: Replace the tiles with ones using the tileset from the current project, or edit them directly on the level's JSON file.
Lack of tiles on the border
Known cause: Chamber doesn't have enough tiles on the border, letting some kind of rays go infinitely out of bounds.
Solution: Enclose the chamber with a 4-5 tile border.