View Single Post
  #1  
Unread 10-29-2011, 02:14 AM
Calax Calax is offline
The Wary
 
Join Date: Oct 2011
Posts: 1
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!
Reply With Quote