| 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 | ![]() |
| chris posted at 2008-08-27 12:13:01 | ![]() |
| masterno posted at 2008-10-21 22:30:38 | ![]() |
| woot posted at 2008-11-09 01:58:03 | ![]() |
| dyla posted at 2009-01-14 03:21:46 | ![]() |
| SpeedCoreFreaK posted at 2009-03-09 21:22:44 | ![]() |
| jora posted at 2009-04-11 11:28:03 | ![]() |
| Sonica posted at 2009-06-28 11:20:58 | ![]() |
| Taltius posted at 2009-09-17 22:29:11 | ![]() |
| sean posted at 2009-10-03 03:22:24 | ![]() |
| Sonica posted at 2009-10-17 16:29:09 | ![]() |
| food3126 posted at 2009-11-29 16:51:45 | ![]() |
| Zsalugater posted at 2009-12-13 20:54:31 | ![]() |
| Me posted at 2009-12-23 23:12:06 | ![]() |
| Bobulus Squishead posted at 2010-01-29 17:31:27 | ![]() |
| Danny posted at 2010-03-21 20:08:23 | ![]() |
| michael posted at 2010-03-26 23:09:20 | ![]() |
| GabMesIRT posted at 2010-05-30 21:27:03 | ![]() |
| Anonymous posted at 2010-07-13 11:04:39 | ![]() |
| Lestat posted at 2010-08-13 12:32:02 | ![]() |
| A guy who wants to make a decent game for the love of making games posted at 2010-08-23 06:12:31 | ![]() |
| Simon Donkers posted at 2010-08-23 09:52:18 | ![]() |




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