Moderators IIYAMA Posted February 13, 2013 Moderators Posted February 13, 2013 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)
Cadu12 Posted February 13, 2013 Posted February 13, 2013 When you create element for client and send to server-side, it wont work.
Moderators IIYAMA Posted February 13, 2013 Author Moderators Posted February 13, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now