Jump to content

moveObject stack overflow


Xwad

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...