not sure if this is specifically your error, but I found what would cause this. You have messed up your conditional statements here:


if(y==0&&x>0){...