AB,
OK, each variable saved gets a new line in the file. In your case the variable _s_dbText contains several lines (with LDText.LF) so this mucks up the file as you see.
Also, in the subroutine OnRabbitCaptured you only modify _s_dbText, so the starting value is different if you run the program reading this variable "number_of_caught_rabbits = 300" first line of _s_dbText , or setting to "Test".
number_of_sequences is actually read as "= 300" that confuses the sum of %.
Easiest to see debugging the program. But the basic issue is the SaveAllVariables having one variable per line and being confused by LDText.LF in string and that fact that some of the parts of the _s_dbText actually include the variable names.
EDIT
I have made a change and uploaded to Beta version (1.2.29.0) of LitDev extension a fix to escape LF/CR characters when using SaveAllvariables and LoadAllVariables.
OK, each variable saved gets a new line in the file. In your case the variable _s_dbText contains several lines (with LDText.LF) so this mucks up the file as you see.
Also, in the subroutine OnRabbitCaptured you only modify _s_dbText, so the starting value is different if you run the program reading this variable "number_of_caught_rabbits = 300" first line of _s_dbText , or setting to "Test".
number_of_sequences is actually read as "= 300" that confuses the sum of %.
Easiest to see debugging the program. But the basic issue is the SaveAllVariables having one variable per line and being confused by LDText.LF in string and that fact that some of the parts of the _s_dbText actually include the variable names.
EDIT
I have made a change and uploaded to Beta version (1.2.29.0) of LitDev extension a fix to escape LF/CR characters when using SaveAllvariables and LoadAllVariables.