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.


Topics - vineeee

Pages: [1]
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...

Example:

That works;
function zapisidatoteko()
local file = io.open("test.txt", "w")
file:write(zapiski)
file:close()
end

That works;
function prebere()
local file = io.open("1.txt", "r")
file:seek("end",-25)
print(file:read("*a"))
-- closes the open file
file:close()
end

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
file:write("--test")

-- closes the open file
file:close()



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


Please help me. I am desperate. Thank you!

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

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.






3
Hi,
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.

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

Pages: [1]