roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
How can i get this table size?
I need to put "," after names, but in last i need to put "."
Need print(text) -> text = You need to kill: rat, rotworm, dragon.
I need to put "," after names, but in last i need to put "."
Need print(text) -> text = You need to kill: rat, rotworm, dragon.
LUA:
local configs = {
["rat"] = {
{5, 100},
},
["rotworm"] = {
{5, 150},
},
["dragon"] = {
{75, 150},
},
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
text = "You need to kill:"
for name, tabela in pairs(configs) do
text = ""..text.." ".. name ..","
-- how i can get the size of table config?
--if i use print (#config) it print 0
--how can i put "." after last name?
end
--print(text)
return true
end
Last edited: