if currentstreak "every number" then
do something
end
11111222223333344444
for example every 5 streak next 5 streak made nextbet = previousbet + 0.00000001
Personally, I would do something like:
streakLimit = 5
function dobet()
...
if (!win) then
-- If it was a loss, increment the counter
myLossStreakCounter = myLossStreakCounter + 1
end
...
if myLossStreakCounter == streakLimit then
-- reached the streak limit, increase bet and reset counter
nextbet = previousbet + 0.00000001
myLossStreakCounter = 0
end
...
If should be relatively obvious how the code can be modified to be used for a Win streak
'then' expected, got '='
Usually it shows a line number where the error occurred. Check near there for incorrect code... failing that, you'd need to post the code for others to be able to debug it properly.