Does anyone know the result if I retrieve a value in a Historical List that doesn't exist, i.e the time x mins ago doesn't have a value ?
For example, I'm saving a tennis stat every 15 seconds and want to compare current, 5 mins ago and 10 mins ago. What result do I get from the 10 min stat at 9 mins into the match ? Zero, null, something else ?
Adressing Historical Lists
weirdly, just looking at this particular issue myself. I'm puzzling as to whether something like ltp40 (LTP from 40 seconds ago) would fail to materialise if there was no entry in the History List (i.e. return a not set variable -e.g ltp40 would not be created).sniffer66 wrote: ↑Fri Aug 21, 2020 12:25 pmDoes anyone know the result if I retrieve a value in a Historical List that doesn't exist, i.e the time x mins ago doesn't have a value ?
For example, I'm saving a tennis stat every 15 seconds and want to compare current, 5 mins ago and 10 mins ago. What result do I get from the 10 min stat at 9 mins into the match ? Zero, null, something else ?
I've amended my process to set ALL sv's to 999 or -1 (in an EVERY rule initialsation routine) before doing any processing to see if that sorts the issue. will keep you posted!
Cheers (again) Jimjimibt wrote: ↑Fri Aug 21, 2020 12:47 pmweirdly, just looking at this particular issue myself. I'm puzzling as to whether something like ltp40 (LTP from 40 seconds ago) would fail to materialise if there was no entry in the History List (i.e. return a not set variable -e.g ltp40 would not be created).sniffer66 wrote: ↑Fri Aug 21, 2020 12:25 pmDoes anyone know the result if I retrieve a value in a Historical List that doesn't exist, i.e the time x mins ago doesn't have a value ?
For example, I'm saving a tennis stat every 15 seconds and want to compare current, 5 mins ago and 10 mins ago. What result do I get from the 10 min stat at 9 mins into the match ? Zero, null, something else ?
I've amended my process to set ALL sv's to 999 or -1 (in an EVERY rule initialsation routine) before doing any processing to see if that sorts the issue. will keep you posted!
Zero settings might work actually. I'm doing a stat_x _now > stat_y_5 > stat_z_10. So x > y > 0 will be true until the 10 min mark. Although up to 5 mins x > 0 will also be true. However, in game stats for the first 5 mins in tennis aren't stable and wouldnt use them anyway so shouldn't make a difference. Will just make my rule trigger 5 mins after in play
in my case, that fixed the problem completely.
now that we can grab history lists into sv's, it might be a good idea to put up a suggestion to provide a DEFAULT value when creating an SV, that way additional code won't be required when working with History Lists and SV's together.
now that we can grab history lists into sv's, it might be a good idea to put up a suggestion to provide a DEFAULT value when creating an SV, that way additional code won't be required when working with History Lists and SV's together.
jimibt wrote: ↑Fri Aug 21, 2020 2:35 pmin my case, that fixed the problem completely.
now that we can grab history lists into sv's, it might be a good idea to put up a suggestion to provide a DEFAULT value when creating an SV, that way additional code won't be required when working with History Lists and SV's together.
I actually had an issue after one of the recent updates where I was adding an SV to itself when it previously hadn't been declared with a value. I'm sure it was working previously. So, I went back and added a new rule to set all applicable SV's to 0 on first run
That makes me think an unset SV orginally had a default value of zero. Maybe it's been changed - I may be wrong
I'll add a suggestion at some point soon regards having a default value that can be filled in... saves any additional steps vis a vis more moving parts to check when changes are made.sniffer66 wrote: ↑Fri Aug 21, 2020 3:34 pmjimibt wrote: ↑Fri Aug 21, 2020 2:35 pmin my case, that fixed the problem completely.
now that we can grab history lists into sv's, it might be a good idea to put up a suggestion to provide a DEFAULT value when creating an SV, that way additional code won't be required when working with History Lists and SV's together.
I actually had an issue after one of the recent updates where I was adding an SV to itself when it previously hadn't been declared with a value. I'm sure it was working previously. So, I went back and added a new rule to set all applicable SV's to 0 on first run
That makes me think an unset SV orginally had a default value of zero. Maybe it's been changed - I may be wrong