Citrus Posted March 29, 2017 Share Posted March 29, 2017 (edited) I need help with this error that it throws me debugscript 3: ----- - local elementSyncer = getElementSyncer(source) - ------ Here's the full function code! function onClientPedLoseSyncer(thePed) if thePed then outputChatBox("Ya tienes un Perro!.") end end addEvent("onClientPedLoseSyncer", true) -- When a ped has no syncer anymore addEventHandler("onClientPedLoseSyncer", getRootElement(), onClientPedLoseSyncer) addEventHandler( "onClientElementStreamOut", getRootElement( ), function ( ) --if getElementType(source == "ped") then -- Is a ped being stramed out? local elementSyncer = getElementSyncer(source) --- Error line!! : attempt to call global 'getElementSyncer' (a nil value) --- if not elementSyncer then triggerClientEvent("onClientPedLoseSyncer", getRootElement(), source) -- Triggers 'onPedLoseSyncer' client-side (param1= ped that ran out of syncers) --triggerServerEvent("onPedLoseSyncer", getLocalPlayer(), source) -- Triggers 'onPedLoseSyncer' server-side (param1= ped that ran out of syncers) end --end end ) What does it mean? Could you fix it ?? pleasE!!!. Edited March 30, 2017 by Dutchman101 Link to comment
Bonsai Posted March 30, 2017 Share Posted March 30, 2017 Its a serverside function only. Link to comment
Citrus Posted March 30, 2017 Author Share Posted March 30, 2017 2 hours ago, Bonsai said: Its a serverside function only. And it is not serious? attempt to call global 'getElementSyncer' (a nil value) FIX PLEASE!!!!! Link to comment
MisterQuestions Posted March 30, 2017 Share Posted March 30, 2017 7 minutes ago, Citrus said: And it is not serious? attempt to call global 'getElementSyncer' (a nil value) FIX PLEASE!!!!! Basically you can't use it like that due your script is client-side. Link to comment
Citrus Posted March 31, 2017 Author Share Posted March 31, 2017 On 30/3/2017 at 00:38, XeroxMTA said: Basically you can't use it like that due your script is client-side. No entiendo nada, hablas castellano?. Tiene o no solución? Porque ya me cansa ese error!. incluso pensaba en eliminar la línea porque nadie me adyua o dice como solucionarlo!. Link to comment
Moderators HAZJ Posted March 31, 2017 Moderators Share Posted March 31, 2017 6 hours ago, Citrus said: No entiendo nada, hablas castellano?. Tiene o no solución? Porque ya me cansa ese error!. incluso pensaba en eliminar la línea porque nadie me adyua o dice como solucionarlo!. Te recuerdo que tenemos la sección en castellano aqui, ésta es la sección general en la que solo se habla en inglés. Xerox te ha indicado que no puedes usar esa función en la parte del server puesto que es una función que se ejecuta solo en el cliente, de ahí tu error. Link to comment
Recommended Posts