well that was akward that i didin't saw that, al i had to do in that if statement was to change secretCodeenterdByuser change to secretCode and now its working! thank you very much.
Also another question, is it possible too make the computer learn that when he has for example 2 exactly right he would guess from there, because now its just random, it doesn't remember that he had 1-2-3 right for example.