Need help with a scripted if statement on a button

BSS_Math shared this question 3 years ago


I am trying to make a program to help students learn how to identify the equation of a quadratic in vertex form. I have attached my ggb file. My issue is that I have created a score counter and I am trying to increase the score count if a student gets the question correct and presses a button for a new parabola.

I have a Boolean variable named T to assess if the relation is entered properly and this works. In the program, on the New Parabola button. I have a scripted if statement

If(T==true, score=score+1)

However this doesn't seem to be working. If I eliminate the conditional, the score increments every time I press the button.

Am I scripting the if statement wrong?

Thank you for your help.

Comments (2)



try :

If(T==true, SetValue(score,score+1))



Worked. Thank you!

© 2023 International GeoGebra Institute