Posted 24 February 2014 - 07:52 PM
Hello,
i am gambling again and tried to make my save file as nice and easy as possible, but it wont work :(/>
I am building strings like these:
And save these into a file and load them later on with:
This doesnt throw a error (at least) but it doesn't create the element like shown above.
I know its not the best solution (or maybe it doesnt even work), but i dont go for security or anything else.
Thank you
unobtanium
i am gambling again and tried to make my save file as nice and easy as possible, but it wont work :(/>
I am building strings like these:
site[1][2] ={"graphPillar",1,1,100,40,0,1337,1,1,false,"NONE","NONE",{},{}}
And save these into a file and load them later on with:
local site = {}
for i=1, 198 do
site[i] = {}
end
-- necessary??
function load()
if not fs.exists("openPeripheralClient") then return end
local file = fs.open("openPeripheralClient","r")
while true do
local line = file.readLine()
if line == "END" then
break
else
assert(loadstring(tostring(line))) -- HERE SHOULD THE MAGIC HAPPEN
end
end
file.close()
end
This doesnt throw a error (at least) but it doesn't create the element like shown above.
I know its not the best solution (or maybe it doesnt even work), but i dont go for security or anything else.
Thank you
unobtanium
Edited on 24 February 2014 - 06:53 PM