Pathfinding error till version 1.6.1657

S

siellevion

Guest
Hello everyone!

I am struggling with a problem i can not solve on my own. Maybe someone of you with much more programming knowledge can help me out.

I am programming a platformer Game. My pathfinding code give me an error. I figured out that all versions below 1.4.1567 does not have this error. 1.4.1567 and up (up to game maker studio2) still give me this error. I am not able to find any help in the pathnotes. I assume there is some changes with ds_maps or something. I would love to program with gameMaker studio 2 which is why i would love to remove this bug.

The error message is:
############################################################################################
FATAL ERROR in
action number 4
of Step Event2
for object obj_pet_rabite3:

DoAdd :2: undefined value
at gml_Script_get_path (line 95) - G = connections[? neighbour] + distances[? current_node];
############################################################################################

--------------------------------------------------------------------------------------------
stack frame is
gml_Script_get_path (line 95)
called from - gml_Script_pathfinder_step (line 148) - path = get_path(x+hsp*2, (bbox_top+bbox_bottom)/2, target_x, target_y);
called from - gml_Object_obj_pet_rabite3_StepEndEvent_4 (line 8) - pathfinder_step();

This problem only occurred when the pathfinding nodes seem to be to far from each other. For example when the entity need to jump over a large cliff and try to get the next node.


Please let me know if you need more information.
 
Last edited by a moderator:
S

siellevion

Guest
Figured something out. Works for now. Still buggy, but ill keep trying
 
Top