Hermes
dziwki kola gramy w lola
Hi there!
5 minutes ago I realised, that I suck at advanced tables, so I have few questions to you, OTLanders!
1. How should look like ordinary table, which will work like:
2. How I can add values to table after defining it?
For example:
3. I saw that someone was using function (to do something with tables ) "isInArray". How this function exactly works? And what's it's general purpose and usage?
Thanks in advance, Hermes
5 minutes ago I realised, that I suck at advanced tables, so I have few questions to you, OTLanders!
1. How should look like ordinary table, which will work like:
Code:
local table = [object1, object2, object3]
local something = object2
if something == "one of items from table" then
doBroadcastMessage("Object matches to one of items from table.", MESSAGE_STATUS_CONSOLE_ORANGE)
elseif something == "is not one of the items in table" then
doBroadcastMessage("Sorry, object doesn't match any of items in table.", MESSAGE_STATUS_CONSOLE_ORANGE)
end
For example:
Code:
local table = [1, 2, 3, 4, 5]
if something == something then
"add to table value 6"
"replace in table value 1 to 7"
end
Thanks in advance, Hermes