Fatti stampare a video tutte le variabili che usi così capisci meglio.

Roby