Hello,
I've got some problem with tables - i add the serial to the table and when i check if it exists there, it outputs that nope.. What's wrong over here?
serials = { }
function addToTable (thePlayer,command)
local serial = getPlayerSerial(thePlayer)
if serial then
table.insert(serials,serial)
outputChatBox ( " #FF0000Serial added successfuly to the table", root, 255, 255, 255, true )
end
end
addCommandHandler ( "addtable" , addToTable )
function checkPlayer(thePlayer, command)
if serials[serial] then
outputChatBox ( " #FF0000There are serials in the table", root, 255, 255, 255, true )
else
outputChatBox ( " #FF0000There are no serials in the table", root, 255, 255, 255, true )
end
end
addCommandHandler ( "checktable" , checkPlayer )