Axel Posted July 20, 2012 Share 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.. Link to comment
Wei Posted July 20, 2012 Share 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) Link to comment
Axel Posted July 20, 2012 Author Share Posted July 20, 2012 Yea thanks... was just the marker.... always making stupid and little mistakes.. Link to comment
qaisjp Posted July 20, 2012 Share Posted July 20, 2012 Either way, it shouldn't cause a stack overflow error.. Link to comment
Axel Posted July 20, 2012 Author Share 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.... Link to comment
Anderl Posted July 20, 2012 Share 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. Link to comment
qaisjp Posted July 20, 2012 Share Posted July 20, 2012 Aha you are correct (anderl it should) Link to comment
GhostXoP Posted July 21, 2012 Share 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. Link to comment
Anderl Posted July 21, 2012 Share 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 ). Link to comment
qaisjp Posted July 21, 2012 Share 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. Link to comment
Castillo Posted July 21, 2012 Share Posted July 21, 2012 I'll lock the topic before it turns into a war. Link to comment
Recommended Posts