Bitcoin Forum
May 06, 2024, 04:33:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
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 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 125132 times)
Dyatrev
Sr. Member
****
Offline Offline

Activity: 980
Merit: 257


View Profile
October 26, 2016, 05:45:51 PM
 #301

i am not sure if this right place to say it but i think there is a little problem with dice bot

when playing with bot if you dont hit green and dont click stop then went to site and hit green dicebot will close itself
1714970002
Hero Member
*
Offline Offline

Posts: 1714970002

View Profile Personal Message (Offline)

Ignore
1714970002
Reply with quote  #2

1714970002
Report to moderator
1714970002
Hero Member
*
Offline Offline

Posts: 1714970002

View Profile Personal Message (Offline)

Ignore
1714970002
Reply with quote  #2

1714970002
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714970002
Hero Member
*
Offline Offline

Posts: 1714970002

View Profile Personal Message (Offline)

Ignore
1714970002
Reply with quote  #2

1714970002
Report to moderator
LuanX3M
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

Guys, why when I code a loop and run the code, the bot crashes?
chilly2k (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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
Merit: 100


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

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?
LuanX3M
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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: 1717
Merit: 1125



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

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

LuanX3M
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
October 29, 2016, 02:42:26 PM
Last edit: October 29, 2016, 04:06:15 PM by LuanX3M
 #314

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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


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
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
October 30, 2016, 01:44:44 PM
Last edit: November 02, 2016, 02:37:06 PM by LuanX3M
 #318


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 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


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

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.  

seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
November 01, 2016, 07:40:59 PM
 #320

Is there a statement that I can use to tell if previousbet = win or not?
yeah. the variable win.
or in code
Code:
if win then
--do something
else
--do something else
end


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 then the current bet won.  

if currentstreak == 2 then                           last 2 bets won

if 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.  
Improved on your statements a bit Smiley
having win and currentstreak==2 is redundant. the currentstreak cant be >0 if win is not true. same for the other one, currentstreak cannot be <0 if win is true. Also, win a Boolean, no need to compare it with something to get a boolean result.

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 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!