Multiply variable reading of io.open
Hello! I have been looking around almost everywhere and not found any example or anything about how you store more than 1 value inside a document.
However I would strongly appreciate a example or if it´s even possible to do so
--Loading the stored variables into a program
local Reader = io.read(file, 'w+')
if Reader:read(1stvariable) then
Variableinside program = 1stvariable
end
if Reader:read(2ndvariable) then
Variableinside program = 2ndvariable
end
Reader:close()
2nd question is
can I use io.write() to only edit the 1stvariable/2ndvariable
in other words how can I edit the 1stvariable/2ndvariable without editing the other one?
Hope I did describe what I want! I'm so thankful if anyone could take their time to help me!
|