Variable Limit, Clean Up and Save Game Editor
I was checking out some stuff that I never really thought about in the past, things such as the variable limit. Back then I wasn't much of a programmer, just a kid trying to learn how to do some Dink stuff. But now that I've finished my computer science education I have the urge to do everything RIGHT from the beginning
So, onto my question...
I've been eliminating all left over variables in Legend's Tale that weren't disposed of correctly, but I've run into a dubious situation... When I use var_used() I get the current amount of variables in use, correct? So, I've been running around checking if it increases beyond the normal amount all over the map, during and after events, etc... So far, I only encountered a few of them and fixed them. But, then I checked again using the Save Game Editor of Justice and, well, there were a lot of other variables in there, often present in large amounts of the same variable... So, now onto the REAL QUESTION: Which one counts toward the variable limit, var_used() or those that can be seen in the save game editor?
Hopefully someone here has the experience or knowledge to help me out
So, onto my question...
I've been eliminating all left over variables in Legend's Tale that weren't disposed of correctly, but I've run into a dubious situation... When I use var_used() I get the current amount of variables in use, correct? So, I've been running around checking if it increases beyond the normal amount all over the map, during and after events, etc... So far, I only encountered a few of them and fixed them. But, then I checked again using the Save Game Editor of Justice and, well, there were a lot of other variables in there, often present in large amounts of the same variable... So, now onto the REAL QUESTION: Which one counts toward the variable limit, var_used() or those that can be seen in the save game editor?
Hopefully someone here has the experience or knowledge to help me out
I think save.dat file includes variables that are 'dead'. So, the next time you need a variable, it just replaces the first 'dead' one.
Does that mean that the amount of variables shown in the savegame editor is equal to the maximum amount ever used at the same time? It would be a convenient way to see if you're well below the maximum at all times...
I believe that the savegame file records a fixed block of memory used for DinkC variables. When one variable is temporaryly created, and then disposed, then the values of the name of the variable, its value, and other things remains unchanged (like being in use), but one value, the one that says if that space is currently in use or is available, is the only one that changes. That could explain the repeated or not in use names of variables that Kyle sees.










