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

#26 2011-06-29 08:41:13

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Please Help a New Blockmaker...

Use recursion:

Code:

factorial: t1
t1 = 0 ifTrue: [^ 1].
^ t1 * (self factorial: (t1-1))

Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#27 2011-06-29 11:10:29

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Please Help a New Blockmaker...

Thank you guys so much!    big_smile

But I have one more question:  Whenever I make a reporter or boolean, the little checkmark that can show or hide a variable appears.  The display is glitchy--when you update the number, instead of updating, it shows a new one.  How do you turn off the ability to show/hide the value?

Offline

 

#28 2011-06-29 11:29:58

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Please Help a New Blockmaker...

Greenatic wrote:

Thank you guys so much!    big_smile

But I have one more question:  Whenever I make a reporter or boolean, the little checkmark that can show or hide a variable appears.  The display is glitchy--when you update the number, instead of updating, it shows a new one.  How do you turn off the ability to show/hide the value?

Scratch has a method for that.
Go to Scratch-Blocks > CommandBlockMorph > all > canBecomeWatcher

You're smart enough to know how to edit that  smile

Offline

 

#29 2011-06-29 11:33:21

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Please Help a New Blockmaker...

Thanks!   big_smile

Offline

 

Board footer