Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : ARGH... this code not working... WHY?


Karim N
2/8/2004 7:47:34 PM
Here it is


function checkWalk(x,y)
trace (map[y][x][0])
if (map[y][x][0] == 2)
return (1)
} else
return (0)



This code returns 0 while tracing 2

I can't understand WHY? what's going on?
PierreAlain
2/8/2004 11:31:51 PM
missing some syntax stuff, but first have to check if a number :

function checkWalk(x,y)
trace (map[y][x][0]);
trace ( map[y][x][0] * 10 ); // to test if really a number, then 2 ->
20

if (map[y][x][0] == 2) {
return (1):
}
else
{
return (0);
}
}


--

Pierre Alain

pie@lifnet.com


"Karim N" <knassar@wcpss.net> a écrit dans le message de
news:c063om$n4$1@forums.macromedia.com...
[quoted text, click to view]

AddThis Social Bookmark Button