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

#1 2011-01-02 18:27:16

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

This script isn't working. Please Help.

Maybe  I misunderstood the function of the "play sound until done block," maybe my script is faulty, or maybe Scratch is spazzing out. Whatever the reason, this isn't working:

http://img256.imageshack.us/img256/6932/picture1htp.png

What I want to happen:
The list "minuet" contains the numbers for 16 sounds. The script goes to each sound, plays it, then moves on to the next, plays it, etc.

But this is what is happening:
The script skips a lot of the sounds. It usually only plays the last on the list. Sometimes it also plays the one at index 9. I've tried in normal, single-stepping, and turbo, with all the same result.

Anyone know what's wrong?


http://i48.tinypic.com/2z5pqad.png

Offline

 

#2 2011-01-02 23:32:41

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

Re: This script isn't working. Please Help.

The script works for me... are you sure that the items in the list and the sound file names are matching up?  hmm


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

Offline

 

#3 2011-01-03 03:07:34

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: This script isn't working. Please Help.

Try uploading the project and we can see more info.


~ihaveamac - visit ihaveamac.net

Offline

 

#4 2011-01-03 13:25:04

scmb1_prime
Scratcher
Registered: 2010-05-17
Posts: 10

Re: This script isn't working. Please Help.

OK, I didn't want to post it (I have a policy about posting unfinished projects  tongue ), but I can't think of anything else to try (I already re-installed Scratch, tried using the same sounds from a different website, etc), so I shared my poor broken project. I put broken all over it so nobody would yell at me about it not working. Anyway, maybe it's just my computer, but it works the same way online as offline. Press Generate. If it's working, you should hear a fairly long song (32 measures). If it's not, you should hear a very short song (2-4 measures).  The failing scripts are in the stage and the Scratch cat (with the "PlayMinuet" or "PlayTrio" hat).

Here it is

I really hope the problem is just something stupid I'm doing.

Last edited by scmb1_prime (2011-01-03 13:26:58)

Offline

 

#5 2011-01-03 15:56:05

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: This script isn't working. Please Help.

That was me in case you didn't know.  tongue

It turns out, that, at least online, it isn't just my computer. I tried it on another computer and it worked the same way.

I also realized how ugly my button is online. I'll fix that before sharing it for real.  tongue

Last edited by scmb1 (2011-01-03 15:59:27)


http://i48.tinypic.com/2z5pqad.png

Offline

 

#6 2011-01-03 19:42:12

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: This script isn't working. Please Help.

Just noticed something: the numbers that get added to "minuet" and "trio" have a seemingly random number of spaces at the end of them. But none of the scripts should do that...

Edit: Ah, I found the problem - most of the items in the lists "m" and "t" have spaces at the end of them (sometimes in front of them, even). Since numbers can't have spaces, it'll return 0 instead (and song #0 doesn't exist).

Now, the only problem would be taking the spaces out of all those items  neutral

Last edited by hmnwilson (2011-01-03 19:57:51)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#7 2011-01-03 20:06:07

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: This script isn't working. Please Help.

hmnwilson wrote:

Just noticed something: the numbers that get added to "minuet" and "trio" have a seemingly random number of spaces at the end of them. But none of the scripts should do that...

Edit: Ah, I found the problem - most of the items in the lists "m" and "t" have spaces at the end of them (sometimes in front of them, even). Since numbers can't have spaces, it'll return 0 instead (and song #0 doesn't exist).

Now, the only problem would be taking the spaces out of all those items  neutral

Thanks so much! It was an easy fix. All I had to do was multiply each value going into "minuet" and "trio" by 1 to turn them into integers, which got rid of the spaces. Thanks- you rock! I'll mention you in my Project Notes.  smile


http://i48.tinypic.com/2z5pqad.png

Offline

 

#8 2011-01-03 20:20:51

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: This script isn't working. Please Help.

No prob  smile


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#9 2011-01-04 19:24:29

MarioLuigi2009
Scratcher
Registered: 2009-12-26
Posts: 63

Re: This script isn't working. Please Help.

You just had to get rid of the list block...

Last edited by MarioLuigi2009 (2011-01-04 19:26:20)


http://mag.racked.eu/mcimage/i349/Achievement++get%21/Slammin+Salmon/mca.pnghttp://mag.racked.eu/mcimage/i5007/Achievement++get%21/Smile+for+the+camera/mca.pnghttp://mag.racked.eu/mcimage/i54/Achievement++get%21/Storin+dirt.../mca.pnghttp://www.minecraftanonymous.com/assets/banners/banner_78.png

Offline

 

#10 2011-01-04 21:56:31

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: This script isn't working. Please Help.

MarioLuigi2009 wrote:

You just had to get rid of the list block...

I'm not sure I get what you mean...


http://i48.tinypic.com/2z5pqad.png

Offline

 

#11 2011-01-05 00:32:26

ojferro
Scratcher
Registered: 2010-12-12
Posts: 3

Re: This script isn't working. Please Help.

It should be working fine. I mean, at least its nothing "stupid" you´re doing.   Just... dont get frustrated and all and try to keep a clear mind in order to solve a problem.


                                   Hope I helped,
                                                           Sincerely,
                                                                          Oswaldo.

Offline

 

#12 2011-01-05 12:12:55

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: This script isn't working. Please Help.

This looks like it's solved now - I'll close it ^^


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer