Hello Guest

Reset on Bet result received does not match

  • 2 Replies
  • 70 Views
*

BlueSuede

  • **
  • 10
  • +1/-0
  • Programmer In Training
    • View Profile
Reset on Bet result received does not match
« on: October 14, 2019, 05:23:17 pm »
Seuntjie - I know this error gets brought up quite a bit. But I'm hoping what I'm asking is a little different. I definitely do not want the safety feature removed. I greatly appreciate it. Today it's happened multiple times and Im just assuming it's something on Wolf.bets end. But if I can reset, then cool, if not, then no biggy.
In all of my scripts I create a resetbets() function. The function runs whenever my stoploss is reached or if my target profit has been reached.
The function recalculates my basebet, stoploss, and targetprofit based on my balance.

Is there a way I can run my resetbets() function if Dicebot shows the error "Bet result received does not match last bet place! Stopping for your safety. stopping" ?
I know this is protect us and is a great feature that DiceBot has.

What I'm looking to do is something like the following:

   if (error) then
      if (string.find(error_string, "Bet result received does not match last bet")) then
         resetbets()
      end
   end


This will allow me to start a new series and prevent dicebot from stopping all together. I know this error also happens if dicebot is getting results that are several bets behind, in that case is there a function that will reset the history so I can continue placing bets?
« Last Edit: October 14, 2019, 06:05:53 pm by BlueSuede »
@RCORE - Your inbox is full. I can't send you PM's.

Need help programming a script? Contact me.
Discord: XclusiveDigital#8102

*

Seuntjie

  • *****
  • 352
  • +11/-2
    • View Profile
Re: Reset on Bet result received does not match
« Reply #1 on: October 14, 2019, 06:23:45 pm »
No. With the way the bot works, once the bot is stopped, there is no more interaction with the script of any kind. There are other challenges in that as well, as you likely will have to wait several minutes to ensure there are no more pending requests from the site before attempting to start the bot again, otherwise it's just going to happen again.

Resetting your history and just starting again isn't going to solve a problem of getting a bet result out of sync with the bets you place. If you place bet y, then get the result of x, it's going to act on the result of x thinking it's y, and place bet z according to that, and possibly only get the result of y after placing z. If the bot knows about x and that it was placed before y, it knows that something is wrong and it can stop. If you make it forget about x, it's not going to know anything is wrong and either continue placing incorrect bets or stop as soon as it gets ys result after placing x.


Edit: Doormat (core code of V4 of dicebot) has the beginnings of script and setting based error handling implemented, and it's a planned feature for when I get time to work on it again. The idea is that when the bot encounters an error, it is categorized and then sent to your script. Your script can have an errorhandler function which will be called with this error, so you can decide what the bot should do for certain errors (ie you can reset your variables and tell the bot to continue betting if you get a reset seed error but stop if you get a withdraw error, or withdraw and then stop if you get a bet mismatch, etc). If your script does not have the errorhandler function implemented or you are using the advanced mode, it will default to your settings, where you will be able to specify similar but more limited actions for the different kinds of errors.
« Last Edit: October 14, 2019, 06:29:46 pm by Seuntjie »

*

BlueSuede

  • **
  • 10
  • +1/-0
  • Programmer In Training
    • View Profile
Re: Reset on Bet result received does not match
« Reply #2 on: October 14, 2019, 06:37:30 pm »
Alright. Thanks for your insight. Much appreciated! The error handling function will be awesome. I'll keep an eye out for its release. I know your busy, so I'll continue using the latest version. Thansk again.
@RCORE - Your inbox is full. I can't send you PM's.

Need help programming a script? Contact me.
Discord: XclusiveDigital#8102