script: waypoint does not work after combat


I created a c++ creature script for tc2 to make a creature act like hyjal mobs(move along the WPs to some point),but i found 2 problems:

1.Server will crash for some null pointer(at _ptiddata __cdecl _getptd_noexit (void ) in tidtable.c)while these creatures up to 50 or more;

2.Creature will stop moving once entered a combat;

I compared my script with hyjal_trash and debug many times to see whats the problem but I failed,any problem with my Scripts?XD


/emoticons/default_smile.png sorry,wrong link corrected.

anyone got some ideas?