--<tell lua you're creating a function> <the function name> <the parameters, separated by columns)function AddNums (number1, number2)--<perform function logic inside the function body>sum = number1+number2--<return a value for the function>return sum--<specify the end of your function>end
function AddNums(number1, number2) sum = number1+number2 return sum end--use this function in another function or another part of the coderesult = AddNums(987654321,123456789)print(result)
function prettyprint(bal, profit, bets, wins) if bets%1000==0 then --every 1000 bets print('Your Balance:'.bal) print('You\'ve made '.profit.' Profit so far') print('You\'ve made a total of '.bets.' bets') print('Of which you have won '.wins) print('And have lost '.(bets-wins)) endend
In computing, the modulo operation finds the remainder after division of one number by another. Given two positive numbers, a and n, a modulo n is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.
5/2 = 2 with 1 remainder ((2*2)+[u]1[/u]=5)Thus 5%2 = 115/6 = 2 with 3 remainder (6*2)+[u]3[/u]=15)15%6 = 3100/20 = 5 with 0 remainder.100%20 = 0
if currentstreak%3==0 and win then--this will execute after EVERY 3 winning bets in a row, so after 3 in a row, 6 in a row, 9 in a row etcendif currentstreak==3 then--this will execute after exactly 3 wins in a rowendif wins%3==0 and win then --after every 3 wins, regardless of whether they are in a streak or notendif wins == 3 then--after you've won exactly 3 bets and then never againend
I'd like to find out what syntax is and what language this is using. For example, in trying to format a printout I tried print(counter "counter") but it throws an error. I also tried print(counter, "counter") but it also throws an error.Also some of the variables seem to be missing. For example, what is the variable for Largest Bet (which shows on the interface but seems to have no variable listed for it).
function dobet()--your logic hereendfunction initialize() if initialized!=true then print('Initializing') initialized=true --define and set your variables that would normally be at the top of your script here. --DO NOT define a variable here using local, if you do, the rest of the script won't be able to use it nextbet = 0.00000001 chance = 49.5 enablezz = false enablesrc = false bethigh = true else print('Already initialized, retrying last bet') endendinitialize()