Hello Guest

# Help with my code

• 1 Replies
• 94 Views

#### howoceblok

• 1
• +0/-0
##### Help with my code
« on: October 24, 2020, 07:53:59 am »
Hello all senior here,

i have made a code but its not work to me please check

this is the code :

base    = balance / 5000000.00
curbet  = 20.0
target  = balance*(0.1/100)
bethigh = false

rollcount = 7

function dobet()

r=math.random(2)

if r == 1 then
bethigh=true
else
bethigh=false
end

--change seed every 7 bet
if rollcount == 7 then
rollcount = 0
resetseed();
resetstats();
else
rollcount = rollcount + 1
end

if (100000) < (nextbet) then
stop();
print(balance)
print("INSUFFICIENT FUNDS-FONDOS INSUFICIENTES")
end

if curbet < 50.0 then
if (win) then
chance = math.random(85.00*100.0, 87.00*100.0)/100.0
nextbet = previousbet*1.005
end
if (!win) then
nextbet = previousbet*2.5
chance = math.random(85.00*100.0, 87.00*100.0)/100.0
end
end

if curbet > 50.0 then
if (win) then
chance = math.random(85.00*100.0, 87.00*100.0)/100.0
nextbet = base
end
if (!win) then
nextbet = previousbet*2.5
chance = math.random(85.00*100.0, 87.00*100.0)/100.0
end
end

if balance > target then
stop()
end

#### Seuntjie

• 534
• +14/-2
##### Re: Help with my code
« Reply #1 on: October 25, 2020, 06:03:38 pm »
We can only see what your code does, not what it's supposed to do, so we can't say why it's not doing what it's supposed to do.

Explain what you need along with your code (and please put your code in the code3 tags)