Adding char names to addon via slash command
Hi so I have addon that helps me distribute mounts and loot in aq40 and I would like to create an exemption table using a slash command.
At the moment I call the slash command via: Code:
SLASH_NLOOT1 = "/nl" where the lua would handle the Player name and pass it to an array or table. this way I could then make the addon check if the player is on that list or not. Thank you for your help. |
Why not replace:
Code:
else Code:
else Code:
else |
Quote:
Code:
elseif input == "print" then |
Use pairs()
Code:
for i,v in pairs(mountList) do print(i,v) end |
ipairs() is only for indexed tables (arrays), and will only work if there are no gaps in the table.
If your table uses keys in place of indices, or there are gaps in your table, use pairs() as Fizzlemizz suggested. http://lua-users.org/wiki/TablesTutorial |
All times are GMT -6. The time now is 06:55 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI