Adressing Historical Lists

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
sniffer66
Posts: 1816
Joined: Thu May 02, 2019 8:37 am

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 ?
User avatar
jimibt
Posts: 4197
Joined: Mon Nov 30, 2015 6:42 pm

sniffer66 wrote:
Fri Aug 21, 2020 12:25 pm
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 ?
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).

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!
sniffer66
Posts: 1816
Joined: Thu May 02, 2019 8:37 am

jimibt wrote:
Fri Aug 21, 2020 12:47 pm
sniffer66 wrote:
Fri Aug 21, 2020 12:25 pm
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 ?
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).

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) Jim

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
User avatar
jimibt
Posts: 4197
Joined: Mon Nov 30, 2015 6:42 pm

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.
sniffer66
Posts: 1816
Joined: Thu May 02, 2019 8:37 am

jimibt wrote:
Fri Aug 21, 2020 2:35 pm
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.

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
User avatar
jimibt
Posts: 4197
Joined: Mon Nov 30, 2015 6:42 pm

sniffer66 wrote:
Fri Aug 21, 2020 3:34 pm
jimibt wrote:
Fri Aug 21, 2020 2:35 pm
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.

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
Posts: 1816
Joined: Thu May 02, 2019 8:37 am

+1 :)
User avatar
jimibt
Posts: 4197
Joined: Mon Nov 30, 2015 6:42 pm

sniffer66 wrote:
Fri Aug 21, 2020 4:28 pm
+1 :)
i've added a Suggestion to create a DEFAULT option for SV's.. just up to US to collectively add our opinions as to whether such a feature is desirable/required.

History Lists and Stored Values
Post Reply

Return to “Bet Angel - Automation”