hi,
this is how I call a function:
var u_answer=1;
get_answer=show_yes_no();
this is the function:
function show_yes_no()
{
while(key_space==off)
{
if(key_cul==on)
{
u_answer=1;
}
if (key_cur==on)
{
u_answer=2;
}
wait(1);
}
return(u_answer);
}
The returning value is always 0. But u_answer can never be 0. Because I never set it to 0!