Help me with this activity!
Posted: Sun Oct 29, 2017 11:56 pm
Hi everyone! I´ve been trying to make this activity where you should put three fields and a button in the fields you should specify the angles of a traingle, and when you hit the button, an image of the triagle should appear, it was working properly, and I closed the file. I do not know why now it is not working, it shows me this error.
***button "What is?": execution error at line 7 (Operators +: error in left operand), char 1***
this is the code
on mouseUp
put field "first" into x
put field "second" into y
put field "third" into z
if x+y+z=180
then set the visible of img "error" to FALSE
if x+y+z=180 and x=60 and y=60 and z=60
then set the visible of img "equilateral(1).png" to TRUE
else
set the visible of img "equilateral(1).png" to FALSE
if x+y+z=180 and x=y or y=z or x=z
then set the visible of img "isosceles" to TRUE
else
set the visible of img "isosceles" to FALSE
if x+y+z=180 and x=90 or y=90 or z=90
then set the visible of img "recto" to TRUE
else
set the visible of img "recto" to FALSE
if x+y+z=180 and x<>y and x<>z and y<>z
then set the visible of img "escaleno" to TRUE
else
set the visible of img "escaleno" to FALSE
if x + y + z <> 180
then set the visible of img "error" to TRUE
end if
end if
end if
end if
end mouseUp
***button "What is?": execution error at line 7 (Operators +: error in left operand), char 1***
this is the code
on mouseUp
put field "first" into x
put field "second" into y
put field "third" into z
if x+y+z=180
then set the visible of img "error" to FALSE
if x+y+z=180 and x=60 and y=60 and z=60
then set the visible of img "equilateral(1).png" to TRUE
else
set the visible of img "equilateral(1).png" to FALSE
if x+y+z=180 and x=y or y=z or x=z
then set the visible of img "isosceles" to TRUE
else
set the visible of img "isosceles" to FALSE
if x+y+z=180 and x=90 or y=90 or z=90
then set the visible of img "recto" to TRUE
else
set the visible of img "recto" to FALSE
if x+y+z=180 and x<>y and x<>z and y<>z
then set the visible of img "escaleno" to TRUE
else
set the visible of img "escaleno" to FALSE
if x + y + z <> 180
then set the visible of img "error" to TRUE
end if
end if
end if
end if
end mouseUp