I have a system to retrieve codes, in case I would put something like this in a text file:
HFGD65,{2454,2454},1,1
would be:
CODE to redeem - string {items} - items within the table in numbers points - numbers days - number
there I open: for example
local file = 'data/logs/codes.txt'
local f = io.open(file, "rb")
for k, v in pairs(f) do
-- retorna aquela linha
end
And I use
local v = ":JH2F36;:{{2173,1},{2160,2}};:0;:1;"
local var = v:gsub(':', ''):explode(';')
To be able to separate, but then I have to use the txt file like this:
:JH2F36;:{{2173,1},{2160,2}};:0;:1;
Is there a different way to call this line?
where would the code have to return string and the more in numbers?
If I separate by "," when I check the table in the middle and end there.
I wanted to simplify and find a way to put the code for example:
HB7S5S;{2173,2160}:1:1
how are 4 items there / \ separated by ":"
the first would return string (the code) - HB7S5S
and the rest (3) would return:
numbers:
(table)
1
1