Trouble returning tables from a separate file
Posted: Wed Jan 29, 2020 12:26 am
Here's the contents of my maps.lua file. I can get this to work from the main.lua but I cannot get this to work using return. I have no idea what I'm doing and I'm basing my code off of something that is 7 years old.
Code: Select all
return {
name = "Dungeon Floor 1",
map = {
0,1,1,1,0,1,1,2,
0,1,0,1,0,1,0,0,
0,0,1,1,0,1,1,1,
1,1,1,0,1,1,0,1,
1,0,1,1,0,1,1,0,
1,1,1,0,0,1,0,1,
0,1,0,1,1,1,1,1,
1,1,1,1,0,1,1,0
}, --Error is here?
map[2] = {
desc="Corridor",
chest=false,
trap=false,
rate=0
}
}