• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

help table

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
hello guys from otland
I would like to bring up a table in the function:doShowTextDialog
like that...
PHP:
local monsters = {"fire elemental","water elemental","electric elemental","earth elemental",}

function onUse(cid, item, frompos, item2, topos)
doShowTextDialog(cid, item.itemid, monsters)
end

I know I can do like
PHP:
local monsters = {"fire elemental\nwater elemental\nelectric elemental\nearth elemental"}

but I do like the first example
 
LUA:
local monsters = {"fire elemental", "water elemental", "electric elemental", "earth elemental"}

function onUse(cid, item, frompos, item2, topos)
	doShowTextDialog(cid, item.itemid, table.concat(monsters, '\n'))
end
 
Back
Top