Veramente nel primo codice c'è anche questa
/linea 10

che è sbagliata ...