Click or drag to resize
GeneralRulesSaveGame Method
Save the current SaveUnit into the specified save slot.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void SaveGame(
	int Slot,
	bool InMemory
)

Parameters

Slot
Type: SystemInt32
Specifies a number to uniquely identify this SaveUnit. If saved to a file, this number plue the ".sav" extension becomes the filename.
InMemory
Type: SystemBoolean
If true, no file will be created; the current state of the game is stored in a "slot" in memory (and lost when the game exits). Otherwise the game data is saved to a file.
Remarks
After saving the game, the SaveUnit is cleared so that any further inclusions will start from an empty set. When the game is saved, the state of the maps and counters are saved in their current state rather than the state they were in when IncludeInSaveUnit(SaveUnitInclusion) and related functions were called. One exception to this rule is WhichMapIsCurrent, which will store the map that was current when IncludeInSaveUnit(SaveUnitInclusion) was called rather than than when the game is actually saved (if these happen to be different). It's possible to save a game in a memory slot as well as a file slot. These are considered different slots and can store different save images even if they use the same number. Otherwise, if a game already exists in a particular slot, it is overwritten.
See Also