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

#1 2011-08-21 01:23:29

pet-Nini
New Scratcher
Registered: 2011-08-19
Posts: 1

Number in the end

Can I count the number in the end?
Like:
Last letter 1 of 123456 = 6
Last letter 1 of 654321 = 1
But not:
letter 6 of 123456 = 6
letter 6 of 654321 = 1

It is because I made 7 characters that each one of them are (1-0) number, that I want
to sahow them all on the stage using <pick random(x)to(y)> = <costume#>. If only counting the frist letter, I cound't do that.

Like I want to add the last letter of 123456, then I can set:
letter 6 of 123456 = 6
But if the number is 7654321, then that is not equal to the last letter:
letter 6 of 7654321 = 2 not equal to
last letter 1 of 7654321 = 1

Can you help me?

Offline

 

#2 2011-08-21 01:30:38

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Number in the end

If the numbers are stored in a variable, you could try:

http://img84.imageshack.us/img84/2959/416howtogetthelastlette.png


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer