Bitcoin Forum
December 18, 2017, 03:57:53 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 52331 times)
LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 27, 2016, 08:42:52 PM
 #341

Guys, why when I code a loop and run the code, the bot crashes?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 27, 2016, 09:08:15 PM
 #342

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 27, 2016, 10:29:49 PM
 #343

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop
Lanzador
Full Member
***
Offline Offline

Activity: 140


View Profile
October 27, 2016, 10:32:02 PM
 #344

I'm really amazed with new features of SDB!! I've found my perfect setting and starting with 0,02 BTC i was able now to reach my frist BTC after around 15 days of slow-action Cheesy
Now looking to see if winnings flow on stable basis, then i will share my preset with you Wink
Thanks Seuntjie boss!  Grin

Can you share your script  Grin Grin

Yes, please do share. What kind of tactics allow you to beat the house edge?
ImbUg
Newbie
*
Offline Offline

Activity: 3


View Profile
October 28, 2016, 12:08:02 AM
 #345

hi all whats up guys i have question

i have some labouchere settings and zig zag and changed client seed settings and ... reset mode settings

i want add all of it in programmer mode you mean i want use one command and bot use all of this advance settings On in programmer mode and add some special other settings into it


some on are expert on write commands i have in mind for seuntjies? its about succes ful please help me and send me your skype id my id is :imbugg1


thanks all regards Grin Grin Grin Grin Grin GrinBTC
xxrongden
Newbie
*
Offline Offline

Activity: 15


View Profile
October 28, 2016, 07:25:00 AM
 #346

I'm really amazed with new features of SDB!! I've found my perfect setting and starting with 0,02 BTC i was able now to reach my frist BTC after around 15 days of slow-action Cheesy
Now looking to see if winnings flow on stable basis, then i will share my preset with you Wink
Thanks Seuntjie boss!  Grin

Can you share your script  Grin Grin

Yes, please do share. What kind of tactics allow you to beat the house edge?

I had try many strategies , but always lose in the long time . Someone have good strategy, please share Grin Grin
LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 28, 2016, 10:31:25 AM
 #347

I'm really amazed with new features of SDB!! I've found my perfect setting and starting with 0,02 BTC i was able now to reach my frist BTC after around 15 days of slow-action Cheesy
Now looking to see if winnings flow on stable basis, then i will share my preset with you Wink
Thanks Seuntjie boss!  Grin

Can you share your script  Grin Grin

Yes, please do share. What kind of tactics allow you to beat the house edge?

I had try many strategies , but always lose in the long time . Someone have good strategy, please share Grin Grin

I got one but I need help with loops
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 28, 2016, 11:59:41 AM
 #348

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?   

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 28, 2016, 01:24:37 PM
 #349

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?   

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
   
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti   
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
     
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet 
  end   

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
   
    if nextbet > balance then
   stop()
end
 
end
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 28, 2016, 01:44:45 PM
 #350

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?   

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
   
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti   
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
     
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet 
  end   

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
   
    if nextbet > balance then
   stop()
end
 
end

Ah ok.  Let me try to explain how the bot and script work. 

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing. 

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.   

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 28, 2016, 04:39:21 PM
 #351

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?   

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
   
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti   
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
     
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet 
  end   

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
   
    if nextbet > balance then
   stop()
end
 
end

Ah ok.  Let me try to explain how the bot and script work. 

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing. 

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.   

And what can I write to replace that?
seuntjie
Legendary
*
Offline Offline

Activity: 1448



View Profile WWW
October 28, 2016, 05:32:36 PM
 #352

This might help explain how the bot and the programmer mode works:
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 29, 2016, 12:09:45 PM
 #353

This might help explain how the bot and the programmer mode works:
https://steemit.com/dicebot/@seuntjie/dicebot-programmer-mode-tutorial-02-process

Seuntjie, this ain't helpin me, I gotta know how to loop on your bot
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 29, 2016, 12:22:09 PM
 #354

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time. 

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?   

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
   
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti   
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
     
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet 
  end   

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
   
    if nextbet > balance then
   stop()
end
 
end

Ah ok.  Let me try to explain how the bot and script work. 

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing. 

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.   

And what can I write to replace that?

   I have no idea what you are trying to do with that loop.  You do realize this is actually one big loop right?  The dobet function gets called after each bet, and when it ends the next bet is placed. 

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 29, 2016, 02:42:26 PM
 #355

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time.  

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?    

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
    
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti  
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
      
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet  
  end    

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
    
    if nextbet > balance then
   stop()
end
  
end

Ah ok.  Let me try to explain how the bot and script work.  

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing.  

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.    

And what can I write to replace that?

   I have no idea what you are trying to do with that loop.  You do realize this is actually one big loop right?  The dobet function gets called after each bet, and when it ends the next bet is placed.  

I want to repeat the same bet. And I tested several loops, and discovered that the bot doesn't support any kind of loops, it crashes 'cause it can't process that much information, so now I need to know how to code a loop without while, repeat-until or for-do statements
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 29, 2016, 04:31:48 PM
 #356

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time.  

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?    

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
    
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti  
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
      
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet  
  end    

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
    
    if nextbet > balance then
   stop()
end
  
end

Ah ok.  Let me try to explain how the bot and script work.  

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing.  

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.    

And what can I write to replace that?

   I have no idea what you are trying to do with that loop.  You do realize this is actually one big loop right?  The dobet function gets called after each bet, and when it ends the next bet is placed.  

I want to repeat the same bet. And I tested several loops, and discovered that the bot doesn't support any kind of loops, it crashes 'cause it can't process that much information, so now I need to know how to code a loop without while, repeat-until or for-do statements

nextbet = previousbet   

That would repeat the previous bet. 

The code you have is

   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet 
  end   

That's a never ending loop unless currentprofit is already greater then previousbet.  The body of your loop is not updating currentprofit or previousbet. 

The code looks like your trying to update nextwinbet (spelled wrong in your code) with the inverse of the currentprofit * the losecount.  That is only done for 3 or more losses in a row.  I'm not sure what the check currentprofit > previousbet is trying to do.  currentprofit will always be negative in the loss path.  and previousbet has to be positive, so that will never be true. 

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 29, 2016, 05:15:29 PM
 #357

Guys, why when I code a loop and run the code, the bot crashes?

  Are you logged onto the site your trying to bet on?  That will crash you every time.  

No, just on the bot, and it doesn't crash right after I start, it crashes when it hits a loop

Post the script, or at least the loop that's crashing.  Does it crash the whole bot, or just stop the script with an error?    

The whole bot

Code:
finaltarget = 35000

chance = 66
martimulti = 3
basebet = 0.1
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .005
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
betlost = (currentprofit < 0) -- if the consoles prints an chunk 18 error delete this line, start the script, stop it, and then rewrite and start the bot again
nextwinbetlost = 0
go = false
set = false


function dobet()
    
if nextbet > balance then
   stop()
end

if balance > finaltarget then
        withdraw(10001, 'DRv1sH3Ni9qSM2AYhYs9wdriSUyNsrPQxW')
    end

if (lastBet.roll < chance) then
  low += 1
end
if (lastBet.roll > (100 - chance)) then
  high += 1
end

if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
     set = false
  else
      nextbet = basebet
  end

   if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 3
        nextwinbet = basebet * martimulti  
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end

    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
   else
      
   end


-- this is the loop that makes the bot crashes
   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet  
  end    

   wincount = 0
   totallose = totallose + 1
   if (totallose >= 6) then go = true end
   nextbet = basebet
 end
    
    if nextbet > balance then
   stop()
end
  
end

Ah ok.  Let me try to explain how the bot and script work.  

When you enter start() on the console, the bot runs through the script.  It sets up any variables before it hits the dobet function.  When it hits the function it saves that part to run later.  It then places the first bet based on your initialization variables.  IE bethigh, chance, nextbet...

Once that bet has been placed and the results come back from the site, the bot will execute the dobet function.  The dobet function has to complete before the bot can place the next bet.

I think the problem is your expecting betting to continue.  Your loop will never complete  if the currentprofit is < previousbet.  I'm not sure why the bot crashes, and doesn't just hang, but it could be running out of storage. or somehow detecting this and crashing.  

   I wouldn't use a loop that is expecting something externally to get updated.  If you were updating something in the loop it should work.    With that said, I've never used the repeat statement in a script so I'm not 100% sure.    

And what can I write to replace that?

   I have no idea what you are trying to do with that loop.  You do realize this is actually one big loop right?  The dobet function gets called after each bet, and when it ends the next bet is placed.  

I want to repeat the same bet. And I tested several loops, and discovered that the bot doesn't support any kind of loops, it crashes 'cause it can't process that much information, so now I need to know how to code a loop without while, repeat-until or for-do statements

nextbet = previousbet    

That would repeat the previous bet.  

The code you have is

   if (losecount >= 3) then
     repeat
       netwinbet = (-curentprofit * losecount)
     until
       currentprofit > previousbet  
  end  

That's a never ending loop unless currentprofit is already greater then previousbet.  The body of your loop is not updating currentprofit or previousbet.  

The code looks like your trying to update nextwinbet (spelled wrong in your code) with the inverse of the currentprofit * the losecount.  That is only done for 3 or more losses in a row.  I'm not sure what the check currentprofit > previousbet is trying to do.  currentprofit will always be negative in the loss path.  and previousbet has to be positive, so that will never be true.  

no, i need the bet to be a X value, and it gotta stay the same
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
October 30, 2016, 04:45:18 AM
 #358


no, i need the bet to be a X value, and it gotta stay the same


so,

   if (losecount >= 3) then
      nextbet = x
  end  

   That will bet X, once you have 3 losses until you hit a win.  

LuanX3M
Jr. Member
*
Offline Offline

Activity: 41


View Profile
October 30, 2016, 01:44:44 PM
 #359


no, i need the bet to be a X value, and it gotta stay the same


so,

   if (losecount >= 3) then
      nextbet = x
  end  

   That will bet X, once you have 3 losses until you hit a win.  

it's not that but dont worry, i already got a way and im testing it right now
chilly2k
Legendary
*
Offline Offline

Activity: 971


View Profile
November 01, 2016, 07:27:40 PM
 #360

Is there a statement that I can use to tell if previousbet = win or not?

   Do you mean the one before the one your currently processing?  

If win == true    then the current bet won.  

if win == true  and currentstreak == 2 then                           last 2 bets won

if win == false and currentstreak == -1 then              current bet lost but previous bet won.  

currentstreak tells you how many bets in a row you won or lost.  +1 or greater for a win streak.  -1 or less for a loss streak.  

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!