This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-18 08:17:42

ashfm
New Scratcher
Registered: 2011-08-17
Posts: 16

String Variables

I have created a variable called fruit and assigned it the value orange.

[blocks]<when green flag clicked> <set{fruit  }to(  "Mango")<say[ fruit]

The problem is that when I click the sprite it says fruit and NOT Mango which is what the fruit variable has been assigned.

Any suggestions.

Cheers

Offline

 

#2 2011-08-18 08:20:43

ashfm
New Scratcher
Registered: 2011-08-17
Posts: 16

Re: String Variables

ashfm wrote:

I have created a variable called fruit and assigned it the value orange.

[blocks]<when green flag clicked> <set{fruit  }to(  "Mango")<say[ fruit]

The problem is that when I click the sprite it says fruit and NOT Mango which is what the fruit variable has been assigned.

Any suggestions.

Cheers

Sorry the value assigned to fruit is orange and not mango.

Offline

 

#3 2011-08-18 08:25:39

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Offline

 

#4 2011-08-18 08:32:50

ashfm
New Scratcher
Registered: 2011-08-17
Posts: 16

Re: String Variables

Thanks very much scimonster.

Offline

 

#5 2011-08-18 09:19:42

sci_test
Scratcher
Registered: 2011-06-22
Posts: 100+

Re: String Variables

ashfm wrote:

Thanks very much scimonster.

You're welcome.  big_smile


[signature removed - please be respectful]
Last edited by scimonster (1970-01-01 00:00:00)

Offline

 

#6 2011-08-18 11:48:16

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: String Variables

Echactly. Except you might want to put in a one that has say fruit for 2 seconds or any amount of seconds.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer