Just in case you are still stuck:
https://github.com/kikito/love-tile-tutorial/wiki
read textfile and save in a multidimensional table
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: read textfile and save in a multidimensional table
When I write def I mean function.
Re: read textfile and save in a multidimensional table
Hi,
thank you all for the big help. It works and that's the code
thank you all for the big help. It works and that's the code
Code: Select all
map={}
k=1
v=1
for line in love.filesystem.lines("labyrinth1.txt") do
map[k] = {}
for i in string.gmatch(line,"%S+") do
map[k][v] = tonumber(i)
v= v+1
end
k= k+1
v=1
end
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests