Still getting random crashes

this is what my function looks like
Code:
Func Travel($aMapID)
MoveMap($aMapID, 2, 0,2)
PingSleep(500)
#WaitMapLoading($aMapID) (I replaced this one with yours)
MapLoadOutpost($aMapID)
Do
PingSleep(500)
Until GetMapIsLoaded() == True
EndFunc