SLUDGE

loadGame


Syntax:

loadGame (filenameString);

Purpose:

Loads a saved game. When you use this function, all of the current data - which functions are running, what each of the variables contains, the size and contents of the background image, the camera position, the floor and so on - will be forgotten and reset to the state stored in the file with the name filenameString.

Therefore, if the call is successful, your program will not continue from the command following the call to loadGame - instead it will continue after the appropriate saveGame call used to create the file. The only situation in which your program will continue from the line following the call to loadGame is if the file given by filenameString doesn't exist.

This function supports filename bodging - for details see the bodgeFilenames command.

Return value:

No return value.

See also:

The World's Easiest Load/Save Mechanism

deleteFile

fileExists

getMatchingFiles

loadCustomData and saveCustomData