Bitcoin Forum
October 21, 2017, 11:38:31 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   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 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 48455 times)
strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 24, 2016, 07:41:21 PM
 #261

I have my script set up so that I have to bet & win same amount two times in a row in order to return to base bet.

Yet how would I set up the script so that after I were to lose so much coins, instead of requiring the dice bot win two times in a row to return to base bet, the dice bot would return to base bet after winning once?

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
1508629111
Hero Member
*
Offline Offline

Posts: 1508629111

View Profile Personal Message (Offline)

Ignore
1508629111
Reply with quote  #2

1508629111
Report to moderator
1508629111
Hero Member
*
Offline Offline

Posts: 1508629111

View Profile Personal Message (Offline)

Ignore
1508629111
Reply with quote  #2

1508629111
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508629111
Hero Member
*
Offline Offline

Posts: 1508629111

View Profile Personal Message (Offline)

Ignore
1508629111
Reply with quote  #2

1508629111
Report to moderator
strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 25, 2016, 02:13:39 AM
 #262

LUA ERROR!!
assignment statement expected, got 'function'



chance=49.5
multiplier=2
base=0.00000010
nextbet = base   
bethigh = false
stoponwin

function dobet()
   if win then
      if (stoponwin) then stop() end -- check new variable.   
      nextbet=base
   else
      nextbet=previousbet*multiplier
   end
end
end

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 25, 2016, 02:56:19 AM
 #263

LUA ERROR!!
assignment statement expected, got 'function'



chance=49.5
multiplier=2
base=0.00000010
nextbet = base   
bethigh = false
stoponwin

function dobet()
   if win then
      if (stoponwin) then stop() end -- check new variable.   
      nextbet=base
   else
      nextbet=previousbet*multiplier
   end
end
end

   The function mentioned in the error, is the dobet() function.  So look at the statement just before it.  stoponwin is not valid for an assignment statement.  You need to tell LUA what stoponwin is equal to.  I think you want stoponwin = true


strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 25, 2016, 05:55:52 PM
 #264

What's the difference between the following variables?

Profit
currentprofit
tmpprofit


I came across the following code many pages back.

------------------------------

chance=77.7
multiplier=1.5
multiplier2=0.92
base=0.0000150
nextbet = base 
bethigh = false
target = .00005
investtarget = .001
tmpprofit = 0
investprofit = 0
wincount = 10
stopnow = false

function dobet()

tmpprofit += currentprofit
investprofit += currentprofit

   if win then
      if (tmpprofit > target) then
         tmpprofit = 0
         nextbet = base
         if(stopnow) then stop() end
         if(investprofit  > investtarget ) then
             investprofit = 0
             invest(investtarget)
         end     
      else
         nextbet=previousbet*multiplier2
         if(nextbet < base) then nextbet = base end
      end
   else
      nextbet=previousbet*multiplier
      if(nextbet < base) then nextbet = base end
   end
end

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 25, 2016, 06:33:31 PM
 #265

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   

strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 26, 2016, 02:01:21 AM
 #266

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   



So if I were to have


if currentprofit=-0.00000050 then


it would mean that once I have a negative value of 50 satoshi I would want the script to do something?

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 26, 2016, 03:32:03 AM
 #267

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   



So if I were to have


if currentprofit=-0.00000050 then


it would mean that once I have a negative value of 50 satoshi I would want the script to do something?

if currentprofit == -0.000000050 then       <----   This is saying check the last bets profit and if it's equal to -50 satoshi's then do something.   

(notice the double equal signs, you want to tell LUA this is a compare and not an assignment)

I normally have resetstats() above the function dobet()  Then you could have

if profit == -0.00000050 then

    To do something if my profit for this session has dropped to -50 satoshi's

so...

currentprofit  is the last bets profit and
profit is the sessions profit

strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 26, 2016, 05:51:00 AM
 #268

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   



So if I were to have


if currentprofit=-0.00000050 then


it would mean that once I have a negative value of 50 satoshi I would want the script to do something?

if currentprofit == -0.000000050 then       <----   This is saying check the last bets profit and if it's equal to -50 satoshi's then do something.   

(notice the double equal signs, you want to tell LUA this is a compare and not an assignment)

I normally have resetstats() above the function dobet()  Then you could have

if profit == -0.00000050 then

    To do something if my profit for this session has dropped to -50 satoshi's

so...

currentprofit  is the last bets profit and
profit is the sessions profit

Thanks to your help I think that I nearly go it.

Would you have any idea why it's throwing me that Error?

LUA ERROR!!
primary expression expected, got 'then'


chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base 
bethigh = true
resetstats()
function dobet()

if win then
   nextbet=previousbet then
   Nextbet = base
end     
 
else
      nextbet=previousbet*multiplier
      if currentstreak==2 then nextbet = base end
   
 end
    
 else
     if currentprofit=-0.00000050 then
     if currentstreak==-1 then
     if win then next bet = basebet  end
     end
    
end
end

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 26, 2016, 06:08:24 AM
 #269

What's the difference between the following variables?

Profit
currentprofit
tmpprofit


I came across the following code many pages back.

------------------------------

chance=77.7
multiplier=1.5
multiplier2=0.92
base=0.0000150
nextbet = base  
bethigh = false
target = .00005
investtarget = .001
tmpprofit = 0
investprofit = 0
wincount = 10
stopnow = false

function dobet()

tmpprofit += currentprofit
investprofit += currentprofit

   if win then
      if (tmpprofit > target) then
         tmpprofit = 0
         nextbet = base
         if(stopnow) then stop() end
         if(investprofit  > investtarget ) then
             investprofit = 0
             invest(investtarget)
         end      
      else
         nextbet=previousbet*multiplier2
         if(nextbet < base) then nextbet = base end
      end
   else
      nextbet=previousbet*multiplier
      if(nextbet < base) then nextbet = base end
   end
end

If only there were some kind of online resource that you could read that explained variables in DiceBot....

Oh, wait:

Edit: Sorry, I know the sarcasm isn't necessary, I just get annoyed that I create the resources and post them, but it gets ignored. A lot of your questions could have been answered if you read through the articles and referenced them when you had a problem. For example that a single = is assignment and double = (==) is a comparison, as explained in the third tutorial on steemit.

chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 26, 2016, 02:29:58 PM
 #270

What's the difference between the following variables?

Profit
currentprofit
tmpprofit

  At the top of the code tab, in programmer mode, there is a list of available variables.  profit and curentprofit are listed there.  That is a list of variables already defined for your script.  RO can only be referenced RW can be changed. 

  I believe profit is your current session profit from the last resetstat call.  currentprofit is the profit from the last bet.  both could be + or -. 

tmpprofit is not used by the bot, but could be defined in your script.    a lot of time you may want to do something till you hit a set profit.  At the beginning of you script you could have tmpprofit += currentprofit. 

That would now keep a running total of you profit since tmpprofit was set.  Later you might check, if (tmpprofit > 4) then withdraw 3 and tmpprofit = 0.  Setting tmpprofit to zero starts your profit calculation over.   



So if I were to have


if currentprofit=-0.00000050 then


it would mean that once I have a negative value of 50 satoshi I would want the script to do something?

if currentprofit == -0.000000050 then       <----   This is saying check the last bets profit and if it's equal to -50 satoshi's then do something.   

(notice the double equal signs, you want to tell LUA this is a compare and not an assignment)

I normally have resetstats() above the function dobet()  Then you could have

if profit == -0.00000050 then

    To do something if my profit for this session has dropped to -50 satoshi's

so...

currentprofit  is the last bets profit and
profit is the sessions profit

Thanks to your help I think that I nearly go it.

Would you have any idea why it's throwing me that Error?

LUA ERROR!!
primary expression expected, got 'then'


chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base 
bethigh = true
resetstats()
function dobet()

if win then
   nextbet=previousbet then
   Nextbet = base
end     
 
else
      nextbet=previousbet*multiplier
      if currentstreak==2 then nextbet = base end
   
 end
    
 else
     if currentprofit=-0.00000050 then
     if currentstreak==-1 then
     if win then next bet = basebet  end
     end
    
end
end

   I think you need to rethink your script. 

There are 2 flavors of the "if" statement. 

if (xyz) then
end

and

if (xyz) then
else
end


in you script you have

if win then
   nextbet=previousbet then
   Nextbet = base
end     
 
else

      Lua and I are both confused about what the else is.  Since you have an end for the first if, the else is just dangling out there. 

If you removed that first end after the first if, Lua would handle that first else, but then the next else would fail.   But at this point I'm lost as to what your trying to do. 

You may be missing the fact you can combine checks on 1 if statement so maybe

          if currentprofit=-0.00000050 then
     if currentstreak==-1 then
     if win then next bet = basebet  end
     end
should be
         if (currentprofit = -0.00000050 and currentstreak = -1 and win = true) then
              nextbet = basebet
         end

There is also a logical error.  you can never have currentprofit and currentstreak negative, and still win. 

   
since you can't go back and see what happened before, you can create a new variable, and set it when you reach your limit. Then in the win path when that variable is set you can reset the nextbet. 

 

Cyrax89721
Sr. Member
****
Offline Offline

Activity: 317



View Profile
August 27, 2016, 01:35:01 PM
 #271

Looking for some help to clean up my code since it's not working like I want it to.  What I'm trying to write is a basic martingale bot for a 1.5x method that doubles on loss, but then repeats the last bet after a win.  Example of what I'm trying to accomplish here.

Code:
chance = 65
enablesrc=true
percentage=0.01
multiplier=2
base = balance*(percentage/100)
basebet = balance*(percentage/100)
nextbet = base
bethigh = false

function dobet()

    if win then
nextbet = previousbet

if win then
nextbet = basebet
else
nextbet = previousbet*multiplier
end
else
nextbet = previousbet*multiplier
end
end

The double on loss works fine, but it keeps resetting to the base bet after the first win.  Why is the "nextbet=previousbet" part not functioning like I want it to?

Also, setting my base bet as a percentage of my balance only does so at the start of running the script.  It doesn't refresh after every cycle like I want it to.  Any ideas if there's a fix for this too?
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 27, 2016, 02:47:20 PM
 #272

Looking for some help to clean up my code since it's not working like I want it to.  What I'm trying to write is a basic martingale bot for a 1.5x method that doubles on loss, but then repeats the last bet after a win.  Example of what I'm trying to accomplish here.

Code:
chance = 65
enablesrc=true
percentage=0.01
multiplier=2
base = balance*(percentage/100)
basebet = balance*(percentage/100)
nextbet = base
bethigh = false

function dobet()

    if win then
nextbet = previousbet

if win then
nextbet = basebet
else
nextbet = previousbet*multiplier
end
else
nextbet = previousbet*multiplier
end
end

The double on loss works fine, but it keeps resetting to the base bet after the first win.  Why is the "nextbet=previousbet" part not functioning like I want it to?

Also, setting my base bet as a percentage of my balance only does so at the start of running the script.  It doesn't refresh after every cycle like I want it to.  Any ideas if there's a fix for this too?

   Your second if win statement is redundant.    So on a win your script first sets nextbet to the previousbet and then sets it to the base bet.  The else leg of that second if will never execute.  If the bet won based on the first if statement it will always be a win in the second. 

   I think you want to change the second "if win" to "if currentstreak == 2 then" and get rid of the else path.  That way on the first win currentstreak will be 1, and you will have set nextbet to the previousbet.  But when you have 2 wins in a row it will bet the basebet.   

as far as resetting the basebet based on balance.  What point do you want to do that?  after 1 win, only after 2 wins, or after more then 1 win.      You would just copy your setting from above, and either put it after nextbet = previousbet  if you want it for any win.  Or after the nextbet = basebet in the second if statement, if you want it only after 2 wins in a row.  If you want it after 2 or more wins.  you could change the second if statement to check "if currentstreak > 1"  that will cause that to execute each time you have more then 1 win in a row.

This is what I think your going for. 

Code:
chance = 65
enablesrc=true
percentage=0.01
multiplier=2
base = balance*(percentage/100)
basebet = balance*(percentage/100)
nextbet = base
bethigh = false

function dobet()

    if win then
nextbet = previousbet

if (currentstreak > 1)then
                        basebet = balance*(percentage/100)     // if you put this here it updates basebet before setting nextbet
nextbet = basebet                              //  if you move it after here, nextbet is still the old value, but the next time it will be updated
        end
else
nextbet = previousbet*multiplier
end
end

Cyrax89721
Sr. Member
****
Offline Offline

Activity: 317



View Profile
August 27, 2016, 03:20:43 PM
 #273

Your second if win statement is redundant.    So on a win your script first sets nextbet to the previousbet and then sets it to the base bet.  The else leg of that second if will never execute.  If the bet won based on the first if statement it will always be a win in the second. 

   I think you want to change the second "if win" to "if currentstreak == 2 then" and get rid of the else path.  That way on the first win currentstreak will be 1, and you will have set nextbet to the previousbet.  But when you have 2 wins in a row it will bet the basebet.   

as far as resetting the basebet based on balance.  What point do you want to do that?  after 1 win, only after 2 wins, or after more then 1 win.      You would just copy your setting from above, and either put it after nextbet = previousbet  if you want it for any win.  Or after the nextbet = basebet in the second if statement, if you want it only after 2 wins in a row.  If you want it after 2 or more wins.  you could change the second if statement to check "if currentstreak > 1"  that will cause that to execute each time you have more then 1 win in a row.

Ok, I thought the redundancy was necessary to execute the bet a second time.  I kind of figured that 'currentstreak' command had to be in there somewhere but wasn't quite sure where.  Shows how much of a programmer I am...  Tongue  The percentage thing was a head-scratcher for me, and your solution is stupid easy.  Your updated script is exactly what I was looking for though, thank you!
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 27, 2016, 04:37:53 PM
 #274

Your second if win statement is redundant.    So on a win your script first sets nextbet to the previousbet and then sets it to the base bet.  The else leg of that second if will never execute.  If the bet won based on the first if statement it will always be a win in the second. 

   I think you want to change the second "if win" to "if currentstreak == 2 then" and get rid of the else path.  That way on the first win currentstreak will be 1, and you will have set nextbet to the previousbet.  But when you have 2 wins in a row it will bet the basebet.   

as far as resetting the basebet based on balance.  What point do you want to do that?  after 1 win, only after 2 wins, or after more then 1 win.      You would just copy your setting from above, and either put it after nextbet = previousbet  if you want it for any win.  Or after the nextbet = basebet in the second if statement, if you want it only after 2 wins in a row.  If you want it after 2 or more wins.  you could change the second if statement to check "if currentstreak > 1"  that will cause that to execute each time you have more then 1 win in a row.

Ok, I thought the redundancy was necessary to execute the bet a second time.  I kind of figured that 'currentstreak' command had to be in there somewhere but wasn't quite sure where.  Shows how much of a programmer I am...  Tongue  The percentage thing was a head-scratcher for me, and your solution is stupid easy.  Your updated script is exactly what I was looking for though, thank you!

You don't need to use the programmer mode for this. You can use the advanced mode. If you un-tick the "reset to base bet after first win" option and set the bot to "after 2 wins, change bet to xxx" you could have had the same functionality.

Cyrax89721
Sr. Member
****
Offline Offline

Activity: 317



View Profile
August 27, 2016, 05:50:26 PM
 #275

Your second if win statement is redundant.    So on a win your script first sets nextbet to the previousbet and then sets it to the base bet.  The else leg of that second if will never execute.  If the bet won based on the first if statement it will always be a win in the second. 

   I think you want to change the second "if win" to "if currentstreak == 2 then" and get rid of the else path.  That way on the first win currentstreak will be 1, and you will have set nextbet to the previousbet.  But when you have 2 wins in a row it will bet the basebet.   

as far as resetting the basebet based on balance.  What point do you want to do that?  after 1 win, only after 2 wins, or after more then 1 win.      You would just copy your setting from above, and either put it after nextbet = previousbet  if you want it for any win.  Or after the nextbet = basebet in the second if statement, if you want it only after 2 wins in a row.  If you want it after 2 or more wins.  you could change the second if statement to check "if currentstreak > 1"  that will cause that to execute each time you have more then 1 win in a row.

Ok, I thought the redundancy was necessary to execute the bet a second time.  I kind of figured that 'currentstreak' command had to be in there somewhere but wasn't quite sure where.  Shows how much of a programmer I am...  Tongue  The percentage thing was a head-scratcher for me, and your solution is stupid easy.  Your updated script is exactly what I was looking for though, thank you!

You don't need to use the programmer mode for this. You can use the advanced mode. If you un-tick the "reset to base bet after first win" option and set the bot to "after 2 wins, change bet to xxx" you could have had the same functionality.

But this doesn't allow the base bet to be a percentage of my balance, unless I can put code into the "after 2 wins..." box?  Another question for programmer mode; is there a sort of "stop on win" command that stops betting after the current cycle is finished instead of a dead 'stop()' in the middle of the cycle?
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
August 27, 2016, 08:30:24 PM
 #276

Your second if win statement is redundant.    So on a win your script first sets nextbet to the previousbet and then sets it to the base bet.  The else leg of that second if will never execute.  If the bet won based on the first if statement it will always be a win in the second. 

   I think you want to change the second "if win" to "if currentstreak == 2 then" and get rid of the else path.  That way on the first win currentstreak will be 1, and you will have set nextbet to the previousbet.  But when you have 2 wins in a row it will bet the basebet.   

as far as resetting the basebet based on balance.  What point do you want to do that?  after 1 win, only after 2 wins, or after more then 1 win.      You would just copy your setting from above, and either put it after nextbet = previousbet  if you want it for any win.  Or after the nextbet = basebet in the second if statement, if you want it only after 2 wins in a row.  If you want it after 2 or more wins.  you could change the second if statement to check "if currentstreak > 1"  that will cause that to execute each time you have more then 1 win in a row.

Ok, I thought the redundancy was necessary to execute the bet a second time.  I kind of figured that 'currentstreak' command had to be in there somewhere but wasn't quite sure where.  Shows how much of a programmer I am...  Tongue  The percentage thing was a head-scratcher for me, and your solution is stupid easy.  Your updated script is exactly what I was looking for though, thank you!

You don't need to use the programmer mode for this. You can use the advanced mode. If you un-tick the "reset to base bet after first win" option and set the bot to "after 2 wins, change bet to xxx" you could have had the same functionality.

But this doesn't allow the base bet to be a percentage of my balance, unless I can put code into the "after 2 wins..." box?  Another question for programmer mode; is there a sort of "stop on win" command that stops betting after the current cycle is finished instead of a dead 'stop()' in the middle of the cycle?

Oh right, now. Sorry I didn't see the percentage base bet thing. There's only the stop command, you'll have to write your own stop on win function. You can do it the same way as the bot does it. Have a stop on win variable that's set to false. If you want to stop on win, set it to true, then if both win and stop on win is true, stop.

Lanzador
Full Member
***
Offline Offline

Activity: 140


View Profile
August 28, 2016, 01:55:01 AM
 #277

Has anyone ever made a script that is sort of a random martingale? E.g. after every win, it selects a new bet multiplier and return?

e.g. runs on a 2x return with a bet multiplier of 2.5
then after its first win, runs on a 4x return with a 1.4x bet multiplier?
strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 28, 2016, 01:14:33 PM
 #278

(wincount == 2 and previousbet != basebet)

What does the "!" mean ?



chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
go = false
set = false


function dobet()


if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance

   
    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 = 40
        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 / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
     
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
 
end

|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
August 28, 2016, 02:53:28 PM
 #279

(wincount == 2 and previousbet != basebet)

What does the "!" mean ?



chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
go = false
set = false


function dobet()


if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance

   
    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 = 40
        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 / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
     
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
 
end

! is NOT.  So !=  means not equal.  That is when comparing.  You can also use it to flip a true/false value.  bethigh = !bethigh  changes bethigh from whatever it is to the other.  so low -> high or high -> low.

strunberg
Sr. Member
****
Offline Offline

Activity: 406


Autonio token sale starts September 22


View Profile
August 29, 2016, 07:30:23 PM
 #280

I'm trying to modify a script to debug my script that I'm basing my script off.

This is the orignal script.

chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
go = false
set = false


function dobet()


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 currentprofit = <-0.00000050 previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 40
        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 / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
      
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
  
end

------------------------------------

The following is my script.

I get the following error when I run it.

LUA ERROR!!
primary expression expected, got 'then'


chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base  
wincount = 0
losecount = 0
totallose = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
    totallose = 0
   nextbet=previousbet then
   Nextbet = base  
   newbalance = balance
   
else

   wincount = 0
    totallose += 1
   nextbet=previousbet*multiplier  
   
end

      if (wincount == 2 and currentprofit = <-0.00000050 and losecount = <5) then
      if win nextbet = basebet end and
      resetstats = true
      end
      end
      
else      
      
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if win  nextbet = basebet end and
       resetstats = true
         end

      
end   

     
end
end


--------------------------------------------------
This is my progress so far in modifying the script to debug mine.


Why do I have this error?

LUA ERROR!!
')' expected, got '='




chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti


function dobet()


if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
  if (wincount == 1) then
     nextbet = basebet

  end

   if (wincount == 2 and currentprofit = <-0.00000050 and losecount += 5) then
      if (stopnow) then stop() end
        martimulti = 40
        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 / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
      
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
  
end







|
   
 
░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░███░░░░░░░░░░░
░░░░░░░░░░█████░░░░░░░░░░
░░░░░░░░░███████░░░░░░░░░
░░░░░░░░█████████░░░░░░░░
░░░░░░░███████████░░░░░░░
░░░░░░█▀▀▀▀▀▀▀▀▀▀▀▀▀█░░░░░░
░░░░░░░░░░░░░░░░░░░░░
░░░░███░░░░░░░░░███░░░░
░░░█████░░░░░░░█████░░░
░░███████░░░░░███████░░
█████████░░░█████████
██████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
AUTONIO
   
   
 
   
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

WEBSITE / WHITEPAPER
TWITTER / FACEBOOK / ANN

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

|
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 »
  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!