Xwad Posted August 17, 2016 Share Posted August 17, 2016 why is the script not working? the debugscript says: stack overflow plane = createObject(10757, -3926, 138, 100, 10, 10, 180) setObjectScale ( plane, 2) function bomber() setTimer(moveObject, 1000, 1) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), bomber) function moveObject() local x,y,z = getElementPosition(plane) local newX = x - 100 moveObject(plane, 8500, x,y,newX ) end Link to comment
Dealman Posted August 17, 2016 Share Posted August 17, 2016 moveObject is a native MTA function. Simply rename your function. Link to comment
Xwad Posted August 17, 2016 Author Share Posted August 17, 2016 lol thats true, i did not see that, thanks:D But now i got a new bug: moveObject Bad Argumentum expected element at argument 1, got none plane = createObject(10757, -3926, 138, 150, 10, 10, 180) setObjectScale ( plane, 0.-- s8) --> function bomber() setTimer(moveObject, 1000, 1) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), bomber) function move_object() local x,y,z = getElementPosition(plane) local newX = x - 100 moveObject(plane, 8500, newX,y,z ) end Link to comment
Xwad Posted August 17, 2016 Author Share Posted August 17, 2016 ohh bug fiex i just triggered the wrong function Link to comment
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