Have you printed out the sciezka array to see what's in it?
I am now a big fan of testing for errortext from functions so I'd be modifying the function a bit to catch any errors. I haven't looked at the contents of the return array before but the doco does imply it's a struct per coord with .x and .y properties.
As a test:
Code:
if ( sciezka && !sciezka .errortext )
foreach wpis in (sciezka)
RunTowardLocation(wpis.x,wpis.y);
sleepms(3);
endforeach
elseif (sciezka .errortext )
PrintTextAbove(cel, sciezka.errortext);
endif
I've noticed that there has been a LOT of discussion about findpath over the last year. I have been avoiding it I must admit.
So where is the memory allocation error occuring? At what line? In findpath or in the RunTowardLocation?
Also, I'd be really careful about having a searchskirt as big as 25. That's going to be a huge attempt. The default is 5, I'd be looking to start with 5 and see.
These are just some thoughts, given my total lack of experience with findpath. Good luck narrowing it down.