This is saved to a file, in which every 32 lines represents the content of the "outer" array, each of the lines have 20 numbers seperated by spaces.
Now I want to open this file in the game and asign it to an array again like this:
Code: Select all
map = {}
i = 1
file = io.open("/Users/linlin/LÖVE/Game2/map.txt", "r")
for line in file:lines() do
map[i] = {}
map[i] = split(lista, " ")
i = i + 1
end
file.close()
How would you do this?
Thanks