Problem with input text boxes

I am having problems with this chunk of code. I realize the problem has to do something with the line _root[“input”+ver] = enterAnswer but im not sure how to fix it - when i trace enterAnswer it gives me an undefined. Any suggestions would be greatly appreciated!


function checkAnswer(ver) {
    _root["input"+ver] = enterAnswer
    correctAns = holdData[ver][2]
    trace (enterAnswer)
    trace (correctAns)
    if ( enterAnswer == correctAns ){
        reply.text = "correct!"
        reply.setTextFormat(replyFormat);
        this["button"+ver]._alpha = 10;
        this["button"+ver]._enabled = false
    }else{
        reply.text = "no im sorry try again"
        reply.setTextFormat(replyFormat);
    }
    
}