Me again. Sorry!
I'm trying to make use of a switch statement for multiple selection. Depending upon what the user enters, will depend on what message will be displayed. Here is what I have so far:
-----------
global choice
on mouseUp
ask "Please enter your colour"
put it into choice
switch
case choice "Red"
case choice = "Blood is red" into line 1 of field "output"
case choice "Blue"
case choice = "The sea is blue" into line 1 of field "output"
case choice "Black"
case choice = "Coal is black" into line 1 of field "output"
case choice "Green"
case choice = "Grass is green" into line 1 of field "output"
case choice "Yellow"
case choice = "The sun is yellow" into line 1 of field "output"
else
put "Sorry, there is no message for that colour." into line 1 of field "output"
end switch
end mouseUp
--------------------
It doesn't work because my structure is all wrong and I don't think a switch statement can contain an else.
Can anyone advise? Also, is it possible to also change the card colour so when the user enters a colour, the message is displayed and the card background changes colour at the same time?
Very kindest regards,
Steven
