Asked
— Edited

I am looking for a little help to finish off this script. The script as it is works, however, I want it to speak the sum of the 2 numbers. I have tried a few different ways but I can't get it. Hey, I pretty proud of getting this far with it. I've made a comment in the code of what I want it to say.
:start
$heard = "speech"
WaitForChange($heard)
if($Heard = "won")
$x = 1
Say("one")
elseif($heard="two")
$x = 2
Say("two")
endif
WaitForChange($heard)
if($heard = "plus one")
$y = 1
Say("plus one")
elseif($heard = "plus two")
$y = 2
Say("plus two")
#print($x + $y)
EndIf
WaitForChange($heard)
if($heard = "what does that equal")
#This is where I want it to say something like "$x plus $y equals the sum" or
for example "1 plus 2 equals 3" (if those were the numbers it heard)
print($x + $y)
Endif
GoTo(start)
As always any help is appreciated, Thanks
@ Luis, How would you make your math game script to go higher on addition? Let say up infinity? Thanks
Up to infinity is a pretty much impossible task however by changing the GetRandom() commands you would change how high it goes.
Check the EZ-Script manual for the syntax and explanation of the GetRandom() command, it explains how to use it.
What is making it print? I don't see a print command
This script doesn't print anything. It takes two numbers and adds them. Then asks you the question and waits for your response. If your response matches the answer, then it tells you that you are correct. If you are wrong, it tells you that you are wrong and asks you to try again. This is if you were talking about the one above from Luis.