Question about lists within lists and saving

aeonmillenia

  • *
  • Posts: 2
I've looked around cannot seem to find too much on the topic. And nothing on saving them (Though I'm not 100% sure if this is the issue.)

In my game, the scene generates a world out of Actors that act as tiles. It then stores around 5 lines of data such as X and Y in a list, but that list is located in a Global Attribute List. (There are around 400 of these lists, too, as there are 400 tiles in a world.) (I hope it in fact can handle 400 lists in a list with 5 lines each...)

When a tile is created, it can properly get all of these 5 lines from the list in the Global List. The world generates fine. I then click a button that saves the game. I also set it up to tell me if it's saved properly or not, too.

Then the game loads if a certain attribute is true, or just generates again if it was never saved. However, when loading, I get this (the attacted file) when the very first tile is created, and is trying to get X (The first value) in the first line of the list (supposedly where the value should still remain)

Does anyone know if there's an issue with saving lists within a list, then loading them? Any help would be appreciated. If this isn't the issue I will look into it more.

hansbe

  • Posts: 262
Saving and loading lists of lists works for me ..

But I don't think you can save just anything, so it might be a good idea to stick to numbers, texts and lists.

aeonmillenia

  • *
  • Posts: 2
Ah, you're right. Though, I was saving only numbers and text in these lists, I just created the tile wrong/at the wrong time. So when loading, no actor existed at all, and it was trying to set an X coordinate to an actor... Which is impossible with no actor. Lol.

Thanks for verifying that for me. This is solved. :)