Galera, to aqui de novo, uma pergunta, como fazer uma condição(if) de 'se o array tiver vazio( {} ) ' ?
não sei como faze-lo. tipo if #array == 0 then . Valeu galera !
end
Galera, to aqui de novo, uma pergunta, como fazer uma condição(if) de 'se o array tiver vazio( {} ) ' ?
não sei como faze-lo. tipo if #array == 0 then . Valeu galera !
end
eh bem como tu boto ae ms
if #array == 0 then
tb pode ser:
if not next(array) then
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
slicer, olha ai meu script, eu acho que não estou colocando a condição no lugar certo. ajuda nos ae fazendo favor
achu q a ideia eh ser algu +/- assim n?
if #array == 0 then selfSay('oi',cid) else local rand = array[math.random(#array)] for k, v in ipairs(array) do if (rand == v) then print(rand) table.remove(array, k) addEvent(table.insert, 10000, array, v) doPlayerAddItem(cid, rand, 1) selfSay('Va com Deus, o amor nao esta aqui, va com Deus.',cid) end end end end
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
n mexo mais com lua... -soh to aki no forum ainda por tedio...-
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
Slicer, sou teu fã. Muito obrigado. Um dia vou scriptear tão bem quanto tu manow
pode ser assim tbm
array = {} if array[1] == nil then print ("certo") end
Por Favor quando for fazer pedidos faz o pedido com mais clareza e com os mínimos detalhes
GOSTO DOS MEUS SCRIPT CLICK EM CURTIR :D
/\ eh mas vai q tenha uma array assim:
local array = { [2] = 1 }
kkk'
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein