Sex* Posted July 23, 2013 Posted July 23, 2013 So I have this weird problem: So I trigger the event from client: setTimer(function() triggerServerEvent("onStart",getLocalPlayer()); end,3000,1) So it triggers another event from server side: addEvent("onStart",true) addEventHandler("onStart",root, function() triggerLatentClientEvent(source,"onServers",100000,false,source,scriptstr); end) But the intresting problem is: [2013-07-23 13:35:37] ERROR: Client (fAp//Se#0080FFX#~>) triggered serverside event onStart, but event is not added serverside WTF!?!
Martyz Posted July 23, 2013 Posted July 23, 2013 you made a mistake by placing ); but you dont need to create new function to use only one setTimer(triggerServerEvent, 3000, 1, "onStart", getLocalPlayer())
Josmis Posted July 23, 2013 Posted July 23, 2013 Try this: addEventHandler("onClientResourceStart",root, function() triggerServerEvent("onStart",getLocalPlayer()); end)
Martyz Posted July 24, 2013 Posted July 24, 2013 Try this: addEventHandler("onClientResourceStart",root, function() triggerServerEvent("onStart",getLocalPlayer()); end) You just copied his wrong script and added to onClientResourceStart handler. My script is fine, it will work if he place it correctly
Sex* Posted July 24, 2013 Author Posted July 24, 2013 Hmm, still says that it isnt added to the server side.
MIKI785 Posted July 24, 2013 Posted July 24, 2013 His client side script is obviously fine as the error is on the server side... Does the addEvent and addEventHandler execute? Put some output between them, i don't see any problem in that code. PS: Don't use ;
Blaawee Posted July 24, 2013 Posted July 24, 2013 The author of the script, The multi lobby arena script
Sex* Posted July 24, 2013 Author Posted July 24, 2013 The author of the script, The multi lobby arena script This is not multi arena script.
Sex* Posted July 25, 2013 Author Posted July 25, 2013 So what is it ? Secret if you dont want to help me then GTFO from my topic.
Martyz Posted July 26, 2013 Posted July 26, 2013 Hmm, still says that it isnt added to the server side. So you get the exact error?
boro Posted July 26, 2013 Posted July 26, 2013 try this server setTimer(function() triggerClientEvent (source, "onStart", root, "test" ) end,3000,1) client addEvent ( "onStart", true ) function startEventHandler () triggerLatentClientEvent(source,"onServers",100000,false,source,scriptstr) end addEventHandler ( "onStart", getLocalPlayer(), startEventHandler )
Sex* Posted July 31, 2013 Author Posted July 31, 2013 Now it doesnt display that error but the overall script still doesnt work...
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