Why am I supposedly "missing a 'to'"?
Posted: Sun Dec 30, 2012 11:39 pm
on mouseup
set the backgroundcolor of rectangle "MySquare" to random(255), random(255), random(255)
end mouseup
The above script I wrote for a button on the same card as a rectangle I've drawn and named "MySquare." My intention is to have the interior of the rectangle change to a random color every time I click the button. "button "Button": compilation error at line 2 (set: missing 'to'), char 31" is the error message I get.
I need help correcting this newbie mistake.
Also, when a character number is noted, as the 'char 31' does above, does that include spaces that separate words? Usually when I count I end up somewhere in the middle or a word and am more confused than ever.
Thanks.
set the backgroundcolor of rectangle "MySquare" to random(255), random(255), random(255)
end mouseup
The above script I wrote for a button on the same card as a rectangle I've drawn and named "MySquare." My intention is to have the interior of the rectangle change to a random color every time I click the button. "button "Button": compilation error at line 2 (set: missing 'to'), char 31" is the error message I get.
I need help correcting this newbie mistake.
Also, when a character number is noted, as the 'char 31' does above, does that include spaces that separate words? Usually when I count I end up somewhere in the middle or a word and am more confused than ever.
Thanks.