FSXTim Posted June 8, 2012 Posted June 8, 2012 Hello, I have a small problem with my script. function ergebnisGet (state) if state == "left" then if(source == cGleich) then local value1 = guiGetText(eingabe1) local value2 = guiGetText(eingabe2) local result = guiGetText(zwischeneingabe) if result == "+" then guiSetText(ergebnis,tonumber(value1)+tonumber(value2)) end if result == "x" then guiSetText(ergebnis,tonumber(value1)*tonumber(value2)) end end end end addEventHandler("onClientGUIClick", getRootElement(), ergebnisGet) The calculation with + works, but the calculation with * doesn't work. Why? Greets
myonlake Posted June 8, 2012 Posted June 8, 2012 Weird, it should work. If I helped you, please click the like button on the right Thanks!
UAEpro Posted June 8, 2012 Posted June 8, 2012 strange ... try function ergebnisGet (state) if state == "left" then if(source == cGleich) then local value1 = guiGetText(eingabe1) local value2 = guiGetText(eingabe2) local result = guiGetText(zwischeneingabe) if result == "+" then guiSetText(ergebnis,tonumber(value1)+tonumber(value2)) elseif result == "x" then guiSetText(ergebnis,tonumber(value1)*tonumber(value2)) end end end end addEventHandler("onClientGUIClick", getRootElement(), ergebnisGet) تيم سبيك بروجيمر ts3server://ts.pg.sa
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now