Open DCAFOC opened 3 years ago
Thanks for adding a report.
I am aware of this issue although it is increasingly rarer. When I started this project I made a bad decision to make the bot stateless and have no record of what it did in previous cycles. I worked to get the timing controls just so, even to account for the execution time of the script itself, however, there are still overlaps between each cycle, or in some rarer cases gaps.
To fix this, I'm going to need to refactor the bot to consider if it has acted on a particular trap before. I don't have a fix yet, but I am aware. I will hopefully have some time in the next week or two to sit down and iron out the current wave of bugs and improvements.
I've been tinkering with the main loop, and I think I may have found a method to have the bot rely on comparing log times instead while disregarding previously logged traps in rawGrades. I have a working example if you'd like to see it.
I've been tinkering with the main loop, and I think I may have found a method to have the bot rely on comparing log times instead while disregarding previously logged traps in rawGrades. I have a working example if you'd like to see it.
Sure, I'd love to
It's been uploaded on my fork.
I like it.
This:
($null -eq $landingEvent -or $null -eq $lastTrapTime)
should read
($null -eq $landingEvent -or $landingEvent -eq $lastTrapTime)
As your 2nd condition isn't comparing if the landingEvent is $null
, it's comparing if it's the same as the lastTrapTime. $null
is on the left here because it's a best practice. Other than that, if you can make the Points feature optional and configurable via the config file I'll be happy to merge into the dev build. If not, I know I intend to sit down and change the bot over to using an index after I finish my group's current campaign which will be sometime in the next few weeks.
Merged request. Going to iron out some smaller things, test for a bit in my group and I'll release.
Thank you for the assistance, I really appreciate it.
Please attach your dcs.log for when the bug is experienced
dcs.log
Event Log lsobot-debug.txt
lsoBot-rawGrades.txt
lsoBot-reGrades.txt
Describe the bug Lsobot will send a duplicate grade for the same trap to discord. See Cycle 9 and 10 in lsobot-debug.txt
To Reproduce Random and rare; dependent on timing.
Environment Info: