Here is a script I've had the problem with... it may have to do with function temp vars or something:
PHP Code:
function HitWall(k,speed,wall) {
temp.foo = k;
for (temp.i=0;i<speed;i+=1/16) {
if (onwall2(check[k][0]+vecx(k)*i,check[k][1]+vecy(k)*i,check[k][2],check[k][3])) {
if (k in {0,2}) {
player.y += vecy(k)*i;
player.y = int(player.y+.5);
} else {
player.chat = k;
player.x += vecx(k)*i;
player.x = int(player.x)+.5;
}
break;
}
}
}
var foo handles the value proper, var k does not. Player chat will return 0.
I've had the problem more than once, as well.