flashspeeder
Member
I'm using Dnd and I'm trying to move the player using the move outside all function but when the player collides with the wall I get the error Invalid callv target #2. Does anyone know what that means?
move_outside_all()
function? Which instance is the target of the code block? Which object is the code block added to? In any case, given an obj_wall
instance and an obj_player
instance, with obj_player
having a collision event for obj_wall
instances, and a single Execute Code block in it with the line move_outside_all(0, 100);
moves the obj_player
instance to the right so it does not touch the wall, without any error for me.Invalid callv target #2
error refers specifically to trying to "call" something that isn't a function or method. e.g.myfunction = noone;
myfunction();
myfunction
isn't callable. you can use the function is_callable()
to check if needed, but most likely it is from a typo or accidentally re-using a variable name, etc.