Axel Posted July 20, 2012 Posted July 20, 2012 marker = createMarker ( 2726.98633, -2015.18066, 12.55469, "cylinder", 1.5, 255, 255, 0, 170 ) markere = { { 2701.85010, -2007.65076, 13.39157 }, { 2696.19385, -1999.32336, 13.30278 }, } function create () local x,y,z = unpack ( markere [ math.random ( #markere ) ] ) createMarker ( x, y, z+2, "arrow", 1.5, 255, 255, 0, 170 ) createVehicle ( 411, x, y, z) end addEventHandler("onMarkerHit",getRootElement(),create) The problem is that where i hit the marker, it creates alot of vehicles and outputs a error about stack overflow, then it times out..
Wei Posted July 20, 2012 Posted July 20, 2012 marker = createMarker ( 2726.98633, -2015.18066, 12.55469, "cylinder", 1.5, 255, 255, 0, 170 ) markere = { { 2701.85010, -2007.65076, 13.39157 }, { 2696.19385, -1999.32336, 13.30278 }, } function create () local x,y,z = unpack ( markere [ math.random ( #markere ) ] ) createMarker ( x, y, z+2, "arrow", 1.5, 255, 255, 0, 170 ) createVehicle ( 411, x, y, z) end addEventHandler("onMarkerHit", marker, create)
Axel Posted July 20, 2012 Author Posted July 20, 2012 Yea thanks... was just the marker.... always making stupid and little mistakes..
MTA Team qaisjp Posted July 20, 2012 MTA Team Posted July 20, 2012 Either way, it shouldn't cause a stack overflow error..
Axel Posted July 20, 2012 Author Posted July 20, 2012 No... i used getRootElement() instead of marker so when i was hitting it it was returning and creating the vehicle and marker over and over again....
Anderl Posted July 20, 2012 Posted July 20, 2012 No... i used getRootElement() instead of marker so when i was hitting it it was returning and creating the vehicle and marker over and over again.... It should not anyway.
MTA Team qaisjp Posted July 20, 2012 MTA Team Posted July 20, 2012 Aha you are correct (anderl it should)
GhostXoP Posted July 21, 2012 Posted July 21, 2012 No... i used getRootElement() instead of marker so when i was hitting it it was returning and creating the vehicle and marker over and over again.... It should not anyway. Someone needs some lessons on what, how, and why a program uses a stack. Most importantly, how an over flow occurs.
Anderl Posted July 21, 2012 Posted July 21, 2012 No... i used getRootElement() instead of marker so when i was hitting it it was returning and creating the vehicle and marker over and over again.... It should not anyway. Someone needs some lessons on what, how, and why a program uses a stack. Most importantly, how an over flow occurs. I don't need any lessons about that, I know perfectly that. I just did not know that it would re-call every time using "root" ( never had that issue ).
MTA Team qaisjp Posted July 21, 2012 MTA Team Posted July 21, 2012 OKAY DONT FIGHT! Anderl, and myself, didn't notice the createMarker. I noticed the createMarker afterwards, but he didn't. He's not a bad scripter and he definitely knows what a stack overflow error is.
Recommended Posts