problem with processing

hi guys, i’m trying to make a school project with arduino and processing but I have a problem.
I’m trying to make a controller with 4 buttons that send the digital signal via serial to a processing game that I made, i succeded into sending the data but the problem is that i can’t undestand why the player is not moving.
here attached the two codes, hope you can find out what is the problem and thank you very much!!!

snake_con_prova_vogtoni.pde (1.26 KB)

bottoni_funzionanti_forum.ino (390 Bytes)

If you have verified that the Arduino is sending the correct data to your Processing program then your Arduino program is working and you need to seek help with your Processing program on a Processing forum.


if (valori=="1");{c=b; v=0;}
if (valori=="2");{c=n; v=0;}
if (valori=="3");{v=b; c=0;}
if (valori=="4");{v=n; c=0;}

What an abysmal indenting (in the whole pde), and what a strange wishful-thinking syntax of if statements.

The above statements do probably not what you are thinking they are doing.