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

#1 2011-07-13 16:58:07

Rick3137
Scratcher
Registered: 2010-01-22
Posts: 57

I need help with a simple counting bug.

Is it my logic or what? Look at my count test project. I used a series of broadcasts to make a variable count to 10. It does not. I thought it might be Scratch or Java, but it does not work on flash. If I can't get Flash to count to 10 I might need to try something else.

Offline

 

#2 2011-07-13 17:09:07

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: I need help with a simple counting bug.

The when i recieve (count) only recieves one broadcast, I think that it can only handle one broadcast at a time.

Offline

 

#3 2011-07-13 17:15:06

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I need help with a simple counting bug.

My guess is that "Count" is being broadcasted at the same time, so it's receiving all those broadcasts at once and only ends up performing the script it's supposed to once. You'll see that if you delay each broadcast, like in the scripts I posted below, it works.

http://i.imgur.com/MfwQ3.gif

Now, why you would want to count in such an inefficient way is beyond me, but I won't question your motives.  wink


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2011-07-13 17:46:04

Rick3137
Scratcher
Registered: 2010-01-22
Posts: 57

Re: I need help with a simple counting bug.

Thanks, I'll try your changes and see what it does.

Offline

 

#5 2011-07-13 17:51:56

Rick3137
Scratcher
Registered: 2010-01-22
Posts: 57

Re: I need help with a simple counting bug.

I Don't really want to count. I was testing the ability of Scratch to do several things at once. This is the only way to speed it up, without using turbo mode.

Offline

 

Board footer