Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - vineeee

Pages: [1]
Programmer Mode / append to file does not work
« on: October 17, 2020, 08:44:47 pm »
Hello all,
i need append mode in file open.
I google for about 30 hours, i tray all, i read all documentation of lua 5.1 and also new one 5.5+, i also read stack overflow...


That works;
function zapisidatoteko()
local file = io.open("test.txt", "w")

That works;
function prebere()
local file = io.open("1.txt", "r")
-- closes the open file

That does not work, tray all combinations, old lua syntaks new lua, same, does not work..

-- Opens a file in append mode
file = io.open("test.lua", "a")

-- appends a word test to the last line of the file

-- closes the open file

Got error:
[string "chunk"]:37: attempt to index local 'file' (a nil value)

Please help me. I am desperate. Thank you!

Programmer Mode / Re: Can't append external File
« on: December 16, 2019, 09:14:28 am »

me again, i really want to use append mode, not for the bet result, but for other stuff.
I have exact the same problem write to file works, but write erase all previous data in that file.. Maybe is something with path..
Which version of LUA is used in this program?
Thank you for great work again!

I did not think updates make bugs fixed also in simulations! (my version is not so old)
Thank you.
Shame on me. I will update  from now one.


i use 3.4.2 version.
I will tray your script.

Can you post an example of this happening in a simulation?
Run this for a minute or two...

Code: [Select]
nextbet = 0.00000001
bethigh = true
chance = 0.1
zacasna = 0

function dobet()

zacasna =math.floor(lastBet.roll * 100)

if currentprofit > 0 then    --only when simulation think is won
print("last won number")
if zacasna < 9990 then
print("wrong!! won but lost in real life")


The simulations use the exact same code for logic and decisions as when it's running normally. The decisions that the bot makes is no different in a simulation than it is when it's placing bets. The visual error you see has no effect on simulations because simulated bets are never shown in the bet log.

The simulations also uses the sites provably fair RNG to generate the random numbers for the bets.

Yes totally agree.
But example: chance 0.1
bethigh = true
for example i set go to base bet if won, else increase by 0.1%.
The number 99.89 falls down. The simulation go to basebet (he thins he won) , but in real game is not won and goes on increasing by 0.1%.
You know what that mean in real life...
For test i do the manual set variables (when won, when lost, profit, balance,..) belong with simulation variables(won, lost, etc), and it is not the same it has "error" for my example 99.89 is won at simulation but in true life is lost.

Thank you for fast replay. Yes i understand that bot is design for many sites. I know that is just visual "mistake" in real play, but if i run simulate i think is not just visual "mistake". I was doing about billion test numbers in simulation, but when i started with real money, i lost a lot. Then i debugging what is difference between simulation and real play and i see that. If in simulation takes 99.89 as won bet, that is 10% error, and house edge is only 1%, at the end simulation was useless. I am not kind a programming guy, yes i can do simulation with all variables calculate manually (can not use any predefined variable), and all profit etc. But that is extremely slow. I need about month to do 1 billion bet simulations on multi computers, with a lot of CPU power. But if i do all calculations myself (do not use any of predefined variables) then it will take half a year or more.... I rather see that simulation is more strictly (get worse result on simulation) then real betting. It's better to lose many on simulation(because of error ) then tray system on real money and lose than.

But thank you for helping us.   
Best Regards


Here are two screenshots. Program show "color" to must won, but in real is lost. That is problematic with simulations, because all simulations on high odds are not correct. The program should be written in a way if > 99.89 then won, of course if chance is 0.1 and bethigh = true, for bethigh = false, if if <0.1 (take two decimals), i... Then there will be no mistakes.  The winning number is 99.9 or higher, or 0.09 or lower.
Thank you,

Programmer Mode / Re: random error on array
« on: November 19, 2019, 07:14:03 pm »
Works like a charm!
Thank you!

Programmer Mode / Re: random error on array
« on: November 19, 2019, 07:07:41 pm »
Thank you!
You are the best.
I printed multiplied value before assign to array, and printed value looks good, but still error. Must be something with decimals which are not displayed with print(zacasna).
print(zacasna) looks good. It's strange some numbers are good some no, better if i get error and does not work, i hate when works on a "half".
Missing some experiences in programming, thank you for pointing me in right direction.  ;)

Programmer Mode / Re: random error on array
« on: November 19, 2019, 05:37:50 pm »
Thank you for quick replay.
Believe me i read a lot of tutorials.
I cleaned code, just to perform error.
Error is random, sometimes after 1 or 2 rolls sometime get more than 20 rolls.
I use version of bot which return 2 decimals from variable lastBet.roll .

Please look i still think is a bug... Very few lines of code. Run simulation of 100 rolls or more and you will see what happens.
I define array in correct size.

Code: [Select]
krog = 0

baza = {}
chance = 50.0

function dobet()

krog = krog +1


function stevilke()

zacasna = 0

if krog == 0 then

for i=0,10000 do
     baza[i]= {}

for j= 0,1 do
baza[i][j]= 0


zacasna= lastBet.roll * 100

for i=0,10000 do

baza[i][1]= baza[i][1]+1





Programmer Mode / random error on array
« on: November 19, 2019, 11:27:06 am »

i think i found bug, the array "lost" initialization/ value randomly.

tested many times, array size is correct! The input value is correct...
Get error randomly..

Right now i do not know what to do next. I am not professional programmer. Asking for help, or learning Python from zero and create my own bot.

Thank you gain Seuntjies for your gret work!

This bug i think is already known it's about decimals, but if i play on very high odds it's a game changer.
For example if i do alot of simulation bets i get dome profit (because wrong interpretation) in real life losing ..

Is there a way to set limits by self? Example if chance is 0.04. Then set won if >=99.60 not  >99.95  (because of decimals) .. I can fix this in program (set all conditions won lost by myself), but then i can't use any predefined variables like currentstreak, ...
I can post print screen, but i think is not needed.

DiceBot General Discussion / Performance dicebot simulation
« on: June 26, 2019, 07:24:11 am »
First of all, thank you Seuntjie for great work on dice bot. I am very grateful for your community contribution.

I am quite new to Lua programing, but it is really very simple and i have no problems at all. I have problems with time which needed for simulation, i notice that simulation use only one CPU core. Yes i open 4 instances of program and run 4 different simulations at once. But i am asking if it is possible to use more CPU cores at once for one simulation? Memory nowadays is not a problem, maybe will be great if there will be option to use more memory, now single program which i tested use only up to 25 MB of memory. If simulation will be much faster i am prepare to give the program 4GB or more memory.. I ran some simulations more then week 24/7.

Once again Thank You for great work!!!

Have the exact the same problem.

Pages: [1]