saving and loading

  1. D

    SOLVED Saving files (i need to save a grid)

    hey so i have leaderboards in my game and i surly sucks if you get a good time close the game and then you open it again the leaderboards are blank. so i wanted to save the grid i store everything in i watched a bit around and so but i dont think i understand it. i found this saveStruct = {...
  2. N

    GMS 2.3+ Trouble with saving ds_lists and arrays to a struct based (json) saving system

    So I have done a video explaining things but the most important things are in the post itself. In the video I show the content of the json file though Hi, I have multiple problems using a save and loading system using json. My Saving code looks like this function SaveTest(){ if...
  3. S

    GMS 2.3+ Getting Vars From and To The Proper Instance

    So I have been trying to work on a "save" system based off of structs and have reviewed many tutorials and the GM manual regarding these related topics. I can get the data I need to save into my structs "technically" but I am having issues when I try to get the data from a specific instance. I...
  4. SirCaliber

    SOLVED Loading sprites as real number from file results in wrong sprites being displayed

    The scribble is meant to be a cheer emote. Basically, I save the cheer emote as a real number in an INI file, then read that number and set the player's emote sprite as that number. However when adding new sprites, textures get mixed up and so the number actually correlates to the scribble now...
  5. Toulhane

    Problem saving and loading data structures with json

    Hi, I followed this Shaun Spalding tutorial to try to implement a saving system in my game while adapting it a bit : My game being a card game, I wanted to save my card inventory which is a ds map (I should probably have made it as a ds list instead but I don't think that's the problem here)...
  6. G

    SOLVED Saving Ds_lists not working

    I've been having issues with creating a reliable save system for the current project I'm working on. I'm trying to save an array which holds all the players stats, like an rpg. I already have ds_lists set up but I've had this consistent problem: Once I have the game, storing all the values into...
  7. L

    GMS 2.3+ save the state of a randomly generated world?

    some time back I created a game that featured a cave that randomly generated itself every time you left and came back, it was a crappy game but I want to make a game similar to terraria or that one obscure scuba flash game but I haven't been able to save my randomly generated worlds and reload...
  8. P

    GML Correctly loading rooms from a save file

    So I am new to Game Maker Studio 2 and have had little experience with coding I was using ds_maps and ds_lists to save the information of my game but whenever I save the room data then go to a different room and load the save the character object spawns on the right of the screen. He will always...
  9. aristhemage

    SOLVED Saving and Loading Arrays (please dont 'dont use arrays, use ds_map' copy pasta me)

    Hi, I know, I know, don't use arrays to save, use maps. But the tutorials and help are all implying that the variable that stores the array isn't the core functionality of the game. I'm making a sandbox game and the way I have it is that there is a variable called world, an array worth about ten...
  10. A

    Legacy GM problem when loading game

    Hi, i got the problem when loading game: instance_create argument 2 incorrect type (undefined) expecting a Number (YYGF) at gml_Script_scrLoad (line 17) - var Inst = instance_create(SaveGrid[# a, 1],SaveGrid[# a, 2],SaveGrid[# a, 0]); //Create Instance at X/Y...
  11. Dr_Nomz

    GML How do I save a ds_list to a ds_grid?

    I thought I knew how to do this, but lot's of testing shows I have no idea how to do this. for (var o=0; o<4; o+=1){ var _row = scr_DSGAR(save_blue_dialogue); save_blue_dialogue[# save_blue_dialogue_enum.option, _row]=option[|o]; } Basically it should just go through each and every value...
  12. MeltingCat

    GMS 2 Saving a ds_grid in a ds_map

    Hi, I'm having trouble saving my inventory system in a ds_map as part of a JSON. I found this thread: https://forum.yoyogames.com/index.php?threads/adding-a-ds-grid-to-a-ds_map.50573/ where the answer to my question seems to be written, but I can't make it work. As of lack of experience I...
  13. P

    How do I Save and Create my character and objects in a Room Using JSON

    I just followed a tutorial by Shaun Spalding and it was kind of confusing for me to understand and transition my game from an ini saving system to JSON. If anyone can help me figure out what I'm doing wrong with my code that would be a huge help. What I would like to happen is that the game...
  14. K

    GMS 2 Saving rooms with JSON

    I'm using JSON to save and load objects and their position, sprite, and any other variables included with them but I cant seem to save and load the room that the save was initiated from and load to that room in-game. Would appreciate any suggestions.
  15. Rizlad

    TimeStamp on saved file.

    So I was throwing some polish on my save menu/features and wanted it to put a date/time stamp into the save.sav file and was wondering how best to approach saving / loading of date_datetime_string information. Any insight is much appreciated !
  16. K

    Setting Array to Global Value

    Well I have a problem but not really sure where to start. Basically I have a weapon system set up in an array with ds_maps in the create even of oWeapon. //AR weapons[2] = ds_map_create(); ds_map_add(weapons[2],"sprite",sAR); ds_map_add(weapons[2],"recoil",25)...
  17. J

    Creating a DS_list within a list and loading from that list

    Hi all, I have figured out how to do saving and loading for a position within a ds_list with the help of Shaun Spaldings excellent tutorial Saving to position 0 var _root_list = ds_list_create(); var _map_player = ds_map_create(); ds_list_add(_root_list, _map_player)...
  18. N

    GMS 2 Saving and Loading JSON

    Whenever I startup my game, I get this error: Data structure with index does not exist. at gml_Script_load_game (line 21) - for (var a = 0; a < 36; a += 1;) global.lc[a] = levelslist[? a]; That's funny, because in my save game code I have this: var levelslist = ds_list_create(); for (var a =...
  19. N

    GML [SOLVED] Where is a ds_map saved?

    So i've been working on a dsmap-based save sytem for my game recently and there's a nasty mistake somewhere in my code, because everytime I use ds_map_find_value it just returns an udefined value, even though I use it with keys that should have values attached to them. Knowing where my games'...
  20. D

    GML Saving And Loading Help

    Hi! I'm a bit inexperienced with saving and loading things, the tutorials online i watch and do 100% as they do, but the game acts like i did nothing after writing the code (No errors, but nothing in the console or noticeable changes) Can someone help me, i just need something that can save...
Top