05-06-2010, 07:35 PM
Easy.
Marshal.dump($game_variables, file)
You can exchange $game_variables with the following:
$game_switches - switches
$game_party - party gold and stuff.
+ all other data of your choice.
Exchange "file" with location of the file.
"Save_File.rxdata" saves it directly into the game folder
"Data/Save_File.rxdata" saves it into the data folder.
EDIT:
If you want to save more than one variable into the file (both switches and variables for instance), you should make an array:
@file = [$game_variables, $game_switches]
Marshal.dump(@file, "Save_File.rxdata"]
Marshal.dump($game_variables, file)
You can exchange $game_variables with the following:
$game_switches - switches
$game_party - party gold and stuff.
+ all other data of your choice.
Exchange "file" with location of the file.
"Save_File.rxdata" saves it directly into the game folder
"Data/Save_File.rxdata" saves it into the data folder.
EDIT:
If you want to save more than one variable into the file (both switches and variables for instance), you should make an array:
@file = [$game_variables, $game_switches]
Marshal.dump(@file, "Save_File.rxdata"]