update code troubles

Post » Sat Aug 03, 2013 1:52 pm

i'm having a hard time with my update code, obviously due to

how values are stored in saves or not.

in my first version, i had

Float     Property    PYR01versionCurrent     Auto  Float                      PYR01version Function CheckVersion ()    if PYR01version        if ( PYR01version < PYR01versionCurrent )            PYR01version = PYR01versionCurrent            s7oPYR01msgUpdate.Show ( PYR01version )        endif    elseif ( !PYR01version || ( PYR01version == 0.0 ) )        PYR01version = PYR01versionCurrent    endifendFunction

this was planned like this:

i'd comfortably set new version numbers from outside script by changing PYR01VersionCurrent value on property.

then it'd check against PYR01Version, which i thought would remain in the save with whatever value it might have.

fact is though:

when i change the value of the property with the old value laready in the save, the new value TOTALLY gets ignored

(which i SO do not get, how on earth can it not get a value that sits right there on the bloody script itself?? but nevermind...)

as for the variable, it has the version number as stored in property, but update msg doesn't show so apparently that number never was in the save, but set by above script (on gameload)

so i dug through wiki's save file notes.

there it says, variables with default values ("int xyz = 1") will have that default value after save is loaded.

about properties, it says, they'd receive the value given in the "master file" (i assume that means the esp), which somewhat contradicts the effect i had above, as that auto property always had the value it FIRST had, which is only "the value given in the master file" unless i change this (which had no effect, see above)

so i tried with the same script but, my values this time like:

Float     Property    PYR01version                             Auto    HiddenFloat                      PYR01versionCurrent    = 1.10

this works fine for the default value variable, it seems to be whatever i set in the script, even after i change it, so i not used this for entering the new version numbers

the property though, which now was meant to receive the version value and keep it stored in the save, always stays 0. (???????)

i tried to get clues from that "property examples" further down wiki's "save file notes", but i'm far from enough coffee for these not to break my brain, maybe later in the day chances might get better, but not sure...

anyway, so i'm pretty clueless here, somebody maybe just could tell me what type of a float i might use for that second part of my little thingie (the one that's meant to keep it's value through the saves to compare with, the one to set it on seems to be fine with default value variable)

thx

User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Return to V - Skyrim