Unexpected error

An unexpected error is a highly unusual error that is encountered, on some computers, while the game is loading. The message "an unexpected error occurred" will appear and shut down the game.

According to the official Game Maker help file:
 * "Rarely you will see a popup with the text "Unexpected error occurred during the game" This error message indicate that some problem occurred in windows or in the hardware. Often the reason for this is infinite recursion, lack of memory or insufficient hardware, drivers or firmware. Generally speaking, these errors have to do with problems outside the gm-environment. If you need to check things more carefully, you can run the game in debug mode. Now a form appears in which you can monitor lots of information in your game."

Things inside your game also may agitate computers to creating the errors. However this only applies on some computers.


 * 1) mp3 music files When .mp3's are put into the game, they rely on a mechanism to play them that many computers do not have. This causes unexpected errors, and is currently believed to be the #1 cause. It may help to update or reinstall Windows Media Player, as Game Maker relies on certain components of it.
 * 2) Color depth Though only rumored, it has been mentioned that a 24 bit color depth can cause unexpected errors. It is better to use 16 or 32 bit color on your games.
 * 3) Direct X Game Maker relies on Direct X 8 or above, as well as a modern operating system. Please refer to the Game Maker System Requirements (section 6.6) for more information.
 * 4) Antivirus software Some antivirus software seem to conflict with Game Maker. Temporarily shutting down the antivirus will allow to launch games normally. Make sure to reactivate your antivirus once you exit Game Maker.