• 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!

[Question] Tables problem

tarjei

Necronian Engineer
Joined
May 25, 2008
Messages
505
Reaction score
126
Location
Poland
Code:
local numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Hello. I have a question to you :D
Is it possible to make npc which print all table elements in that order like in table?

I mean
selfSay('1,2,3,4,5,6,7,8,9,10') change it to
selfSay(numbers)

I know that it's not possible to print table but there must be some trick that allow to do something like that. :p

Thanks in adance =]
//Tarjei
 
Code:
   local say = ""
   for i = 1, table.maxn(numbers) do
       if say == "" then s = "" else s = "," end
       say = say..""..s.." "..i
   end

   selfSay(say..".")

Kinda lame way, but always :p
 
Back
Top