Why am I supposedly "missing a 'to'"?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 14
- Joined: Sat Feb 14, 2009 11:25 pm
Why am I supposedly "missing a 'to'"?
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.
Re: Why am I supposedly "missing a 'to'"?
grc or graphic not rectangle
set the backgroundcolor of grc "MySquare" to random(255), random(255), random(255)
Simon
set the backgroundcolor of grc "MySquare" to random(255), random(255), random(255)
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 14
- Joined: Sat Feb 14, 2009 11:25 pm
Re: Why am I supposedly "missing a 'to'"?
That did away with the error message (thanks), but I can't get the color to change.
Re: Why am I supposedly "missing a 'to'"?
In the inspector click on "Opaque".
Saw that one coming should have mentioned it as well.
Simon
Saw that one coming should have mentioned it as well.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Why am I supposedly "missing a 'to'"?
Hi.
Spaces are counted.
Click on the error message itself, and the problem area in the offending line will hilite. Very helpful.
Craig Newman
Spaces are counted.
Click on the error message itself, and the problem area in the offending line will hilite. Very helpful.
Craig Newman
-
- Posts: 14
- Joined: Sat Feb 14, 2009 11:25 pm
Re: Why am I supposedly "missing a 'to'"?
Checked "Opaque" and, Hallelujah! That would've taken me quite a while to figure out on my own. Thanks.