Data Class Bug?

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
LM280
Monty Mole
Monty Mole
Posts: 121
Joined: Wed Jan 15, 2014 7:10 pm

Data Class Bug?

Postby LM280 » Thu Feb 15, 2018 5:26 pm

Not sure what causes it, but it seems like when using the data class it does not save or load data correctly under certain circumstances?

I'm using episode-wide, saveslot specific, encrypted instances of Data in lunaworld.lua, and I every time I set a value it is saved directly after.
100% of the time, in multiple different situations, if you exit from level A to level B via a warp, set a value, and then exit the level B to the world map, when you return to a level from the map, the value will be whatever value it was when you left level A.

Does anyone know either how to fix it, an alternative to the Data Class for episode-wide variables, or where I could find the code so I could look at it and maybe see what causes it?

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Data Class Bug?

Postby The0x539 » Thu Feb 15, 2018 6:22 pm

Post your code.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Data Class Bug?

Postby PixelPest » Thu Feb 15, 2018 9:50 pm

Make sure you call Data:save in onLevelExit as well. But as 0x said you've got to post your code


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari