Nope, those files are fine...the problem lies in the RunEndDayCheck.txt file....i just tried running it using the runfile in the debug options and, instead of seeing those vars go up/down maximum by 1 as you expected, they went down 4-5 points each...that's probably where the errors come from.
It has to do with the @NullResponse @End lines.. it is ignoring the end because it is with a nullresponse...so it goes to the correct @Goto()/@CheckFlag() initially, but then it doesn't stop where it should and, instead, go thrhough the whole file till the end, thus causing multiple variations to the variables.
I tried changing those @NullResponse @End to just @End and running the file again: both vars lost 0 points as expected due to my variable setup. And the script ended as supposed to.
I see no control on why they should never go over 31 or lower than 0, nor why they should share a total sum of 31...you initially setup neutral=31,bad and good=0 and she starts on neutral....but apart for that there is no real system checking if the sum of the 3 variables is 31 nor if any of them goes over 31 or lower than 0....ok, by how the code is written they should never do...but, imho, just in case you have done an error in the variations, or if anything strange happens for whatever unexpected reason, it might happen...and since it is so critical (because if those var go below 0 they seem to screw up all the #DT vocabs), you should put in a "safenet" and, before exiting the script, do a check...like this:GoodDay and BadDay are not suppose to ever go into negative at all, nor are they suppose to change during a session
They should only change at the very end, and only should one of them increase or decrease by 1. <-- Sharing a total sum of 31, with 0 being the lowest possible value and 31 being the highest possible value. Will be looking into that system later today.
change all:
@NullResponse @End
to
@NullResponse @Goto(EndChecks)
(EndChecks)
@NullResponse @If[GoodDays]<[0]Then(restoreGoodLow)
@NullResponse @If[GoodDays]>[31]Then(restoreGoodHigh)
(checkBad)
@NullResponse @If[BadDays]<[0]Then(restoreBadLow)
@NullResponse @If[BadDays]>[31]Then(restoreBadHigh)
(checkNeutral)
@NullResponse @If[NeutralDays]<[0]Then(restoreNeutralLow)
@NullResponse @If[NeutralDays]>[31]Then(restoreNeutralHigh)
@End
(restoreGoodLow)
@NullResponse @SetVar[GoodDays]=[0] @Goto(checkBad)
(restoreGoodHigh)
@NullResponse @SetVar[GoodDays]=[31] @Goto(checkBad)
(restoreBadLow)
@NullResponse @SetVar[BadDays]=[0] @Goto(checkNeutral)
(restoreBadHigh)
@NullResponse @SetVar[BadDays]=[31] @Goto(checkNeutral)
(restoreNeutralLow)
@NullResponse @SetVar[NeutralDays]=[0]
@End
(restoreNeutralHigh)
@NullResponse @SetVar[NeutralDays]=[31]
@End
This way you'll be sure none of them can ever possibly go over/below those values (the only thing left unchecked is if the sum of all three is =31 but i am not sure if it has any meaning in the end (and, probably, those checks will not even be needed...but just in case anything goes wrong they will avoid messing up everything)