My functionality of my class is bugging

here is the function class (1/4 classes):
What am I doing wrong?

--[[
    The Functionality of our calculator
    
    Made by TokOut
    Born: 26/01/2003
    Made since: 27/11/2015
    Made till: Non Value
]]


function calculator(key, key2)
        if key == ce then
            number = 0
            key = 0
        end
    
        if string.sub(key, 1, 1)=="" then
            if key2 == "" then
                
            end
        end
    
        if key == "ans" then
            print("Answer Status")
            number2 = number
            operation = key2
        
            if key2 == "+" then
                txt.value = number .. " + "
            elseif key2 == "-" then
                txt.value = number .. " - "
            elseif key2 == "*" then
                txt.value = number .. "•"
            elseif key2 == "/" then
                txt.value = number .. " : "
            end
        
            isNumber1 = false
            number = 0
            usedPi = false
        end
    
        if isNumber1 == true then
            if usedPi == false then
                if number == 0 then
                    number = key
                else
                    number = number .. key
                end
            else
                number = 0
                usedPi = false
            end
            txt.value = number
        else
            if key == math.pi then
                txt.value = txt.value .. key
            end
        end
end

function answer()
    if operation == "+" then
        answernumber = number + number2
        txt.value = answernumber
    end
end

```

@TokOut You ask What am I doing wrong. The answer, you’re trying to write code without knowing what you’re doing. You keep posting code that doesn’t work and asking someone else to fix it. You keep ignoring any help that’s given to you and you just start another program that doesn’t work. I for one am not helping you anymore.