I noticed two tiny errors (that are VERY easy to miss, so don't beat yourself up over it). First, in the map_setup() function, you have ania1 and ania2, but they should be anim1 and anim2 (you have a instead of m). That little error will trip you up later. But the one I think that's causing the problem is toward the end of your move_player() function. You have p.x=mid(0,mewx,128) instead of p.x=mid(0,newx,127). (You have mewx instead of newx and 128 instead of 127.) And then on the next line you have p.y=mid(0,newy,64) instead of p.y=mid(0,newy,63). (You have 64 instead of 63.)
Hope that helps! Let me know if you're still stuck after fixing that. (Also, make sure your sprites/tiles don't have any flags checked that shouldn't be checked.)