Perhaps some one can clarify my error, or is this a bug? I have a simple ScriptCard based encounter check, it runs a loop for a number of times and queries a table to get an animal, if an encounter needs to be generated. Everything looks fine, but it retains the value returned from the table, even though a new check should generate a new query... do i need to clear/flush the values, or am missing something here? In this example I compare generating three values from the table, string, variable and the writing the variable to persistent storage ,for example I loop through 5 checks, and the values from the table do not update, staying "Owl", "Chicken" "Cat " through all 5 loops, screen shot to follow. Here is the script: !scriptcard {{ --#title|Encounter --#debug|1 --=Count|1 --=CountLimit|?{Limit|1} --:CheckEncounter| --=ERoll| 1d6 --+CurrentCount| [$Count] of [$CountLimit] ERoll: [$ERoll] --?[$ERoll] -le 5|>AnEncounter --?[$ERoll] -ge 6|>NOEncounter --:AnEncounter| --+[#FF0000] [$Count] Encounter| [/#] --=ThisRoll|[[1t[Animals-Woodland] ]] --+ThisRoll| [$ThisRoll.RollText] --&StringTest|[[1t[Animals-Woodland] ]] --+StringRoll| [&StringTest] --&MyStr|[[1t[Animals-Woodland] ]] --~MyStr|stateitem;write;stringvariable --~RetrievedStr|stateitem;read;stringvariable --+stateitem:|[&RetrievedStr] --=Count| [$Count] + 1 --?[$Count] -gt [$CountLimit]| EndEncounterCheck --^CheckEncounter| --:NOEncounter| --+[#006400] [$Count] NOEncounter|[/#] --=Count| [$Count] + 1 --?[$Count] -gt [$CountLimit]| EndEncounterCheck --^CheckEncounter| --:EndEncounterCheck| --X:| }} As always thanks for any insights as to what my error is.