Forum




Input Output (io)
2 replies



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local f = io.open("savefile.txt", "w")
f:write(level.."\n"..exp)
f:close()
function line(s, b)
local a = 0
for l in io.lines(s) do
a = a + 1
if a == b then
return l
end
end
end
level = line("savefile.txt", 1)
exp = line("savefile.txt", 2)
Ill have to switch over the code here soon. I decided to make a save called (usgn) Level.txt and (usgn) Exp.txt
it works too

Also, I didnt save that to put you down. Incase you figure that.



