Jump to content

I can't find my mistake.


IIYAMA

Recommended Posts

  • Moderators

I am confused, yesterday I made like 5 working triggers, but today I can't find what is wrong... 0 errors or warnings...

  
--client 
function addCommand() 
    outputChatBox("1") 
    local object = createElement("flag") 
    triggerServerEvent ("addObjectExpl",getLocalPlayer(),object) 
    --triggerServerEvent ("addObjectExpl",localPlayer,object) 
end 
  
addCommandHandler ("lol", addCommand) 

  
--server 
local objectExpl = {} 
local objectExplTimer 
function addToObjectExpl (object) 
    outputChatBox("2") 
    table.insert(objectExpl,{object,20}) 
    if not isTimer (objectExplTimer) then 
        objectExplTimer = setTimer (objectTimer,500,0) 
    end 
end 
addEvent("addObjectExpl", true) 
addEventHandler("addObjectExpl", getRootElement(), addToObjectExpl) 

Link to comment
  • Moderators

lol this is the problem:

local object = createElement("flag") 

Some how this object does not have user data....

but when I trigger this, nothing will happen, not even "you can't trigger a nil value" :(

yes, I found it out 2 secondes before you posted.

thx any way

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...