To expand on pgimeno's code, you possibly might be thinking about this
Code: Select all
return {
name = "Dungeon Floor 1",
map = {
[1] = {
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
},
[2] = {
desc="Corridor",
chest=false,
trap=false,
rate=0
}
}
The reason you were having difficulties is that you were making the table look something like this
Code: Select all
map = {
[1] = 0,
[2] = { -- here you were trying to overwrite an index in yourtable.map that doesn't exist until you have the final closing bracket.
desc="Corridor",
chest=false,
trap=false,
rate=0
},
[3] = 1,
[4] = 1,
[5] = 0,
[6] = 1,
-- keep going with your numbers.
}