GOD Half
Member
- Joined
- May 9, 2010
- Messages
- 179
- Reaction score
- 15
I need to find the information based on the position of each array.
Currently the search system searches based on the vocation of the player. But that's not enough that I need.
For example: I need to get the information that is in [2] and position 3. Would the result be 8 or 9? If it starts with 0 it would be 9, but if it starts with 1 then it is 8.
How do I build the formula to find the value of the position I want?
Thank's
Lua:
local arrayVoc = {
[1] = {1, 2, 3, 4, 5},
[2] = {6, 7, 8, 9, 10},
[3] = {11, 12, 13, 14, 15},
[4] = {16, 17, 18, 19, 20},
[5] = {21, 22, 23, 24, 25},
[6] = {26, 27, 28, 29, 30}
}
Currently the search system searches based on the vocation of the player. But that's not enough that I need.
Lua:
if isInArray(arrayVoc[1], player:getVocation():getId()) then
...
end
For example: I need to get the information that is in [2] and position 3. Would the result be 8 or 9? If it starts with 0 it would be 9, but if it starts with 1 then it is 8.
How do I build the formula to find the value of the position I want?
Thank's