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
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.