| Save and load script |
//////////////// Save and load script //////////////////// // // Copyright Simon Donkers 27-1-2005 // www.simondonkers.com - gmmentor@simondonkers.com // // argument0 = 0 for saving, 1 for loading // argument1 = file extension. For example .sav // Do not add a '*' sign for the extension // standard directory is the directory the game stands in // ///////////////////////////////////////////////////// var Savegame,Loadgame; if argument0 = 0 then { SaveGame = get_save_filename('SaveGame(*' + argument1 + ')|*' + argument1 + '', ''); if SaveGame != '' then if string_copy(SaveGame, string_length(SaveGame) - 3, 4) != argument1 then SaveGame = SaveGame + argument1; game_save(SaveGame); } else { LoadGame = get_open_filename('Save games|*' + argument1 + '', ''); if (LoadGame != '') then if file_exists(LoadGame) then game_load(LoadGame); } |
Tip: Have a look at the tutorial How to execute a script
User comments
| N/A posted at 2005-09-05 19:14:23 | ![]() |
| N/A posted at 2005-09-30 19:19:04 | ![]() |
| N/A posted at 2006-05-03 19:14:36 | ![]() |
| schalk bower posted at 2006-05-06 05:44:42 | ![]() |
| schalk bower posted at 2006-05-06 09:38:30 | ![]() |
| Stijn posted at 2006-06-07 17:56:18 | ![]() |
| GameMakinRyan posted at 2006-07-27 18:13:13 | ![]() |
| samushi posted at 2006-10-30 10:58:21 | ![]() |
| Simon Donkers posted at 2006-10-30 15:03:52 | ![]() |
| samushi posted at 2006-11-02 10:51:02 | ![]() |
| Rob posted at 2006-12-13 19:16:03 | ![]() |
| Donkey posted at 2007-01-02 13:59:04 | ![]() |
| Thanks a bunch!!!!!!!!!!!!!!!!!!!! posted at 2007-03-29 03:08:40 | ![]() |
| It works posted at 2007-05-12 18:41:42 | ![]() |
| Dalortins posted at 2007-07-07 20:32:47 | ![]() |
| Trident posted at 2007-08-08 04:09:20 | ![]() |
| jared posted at 2007-09-21 18:23:39 | ![]() |
| Dazzque posted at 2008-03-04 16:47:18 | ![]() |
| anon posted at 2008-03-22 04:26:37 | ![]() |
| stefan posted at 2008-03-22 16:37:49 | ![]() |
| tyga101 posted at 2008-03-30 07:39:33 | ![]() |
| Viski posted at 2008-03-31 15:43:11 | ![]() |
| NN KH Maker posted at 2008-05-21 19:54:29 | ![]() |
| Mr.Noname posted at 2008-05-26 15:19:06 | ![]() |
| zergber posted at 2008-08-07 07:40:29 | ![]() |




. this is going to make my game so better u are the best gamemaker scripter ever!!!!!!!
