beenii
Well-Known Member
- Joined
- Jul 26, 2010
- Messages
- 580
- Solutions
- 1
- Reaction score
- 57
Hi, I'm trying to read the information in this table, I don't know if the structure of my table is wrong, or my way of wanting to receive the data
Table:
Call data:
I want to read the information of the first wave, and then call the 2, so on
Table:
Lua:
towerTileConf = {
[37101] = {
minLevel = 100,
centerArena = Position(31957, 32335, 7), -- Centro de la arena
rangoX = 6, -- rango en X del centro
rangoY = 6, -- rango en Y del centro
playerPos = Position(31957, 32337, 7), -- Enter player position
WAVES = {
[1] = {
[1] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[2] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[3] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[4] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[5] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)}
},
[2] = {
[1] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[2] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[3] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[4] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[5] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)}
},
[3] = {
[1] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[2] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[3] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[4] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)},
[5] = {monsterName = "Minotaur", level = 50, spawnPos = Position(31957, 32335, 7)}
}
}
}
Call data:
Code:
local towerConfig = item.actionid
local tileReqTower = towerTileConf[towerConfig]
for i = 1, #tileReqTower.WAVES[1].[i] do
tileReqTower.WAVES[1].[i].monsterName
end
I want to read the information of the first wave, and then call the 2, so on