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

#1 2008-02-22 22:17:58

Masterock
Scratcher
Registered: 2007-12-01
Posts: 16

Work and then doesn't!!!!

I had a game I was working on(which I have now given up because it was too time consuming) and it worked every other time i saved,uploaded,or downloaded it. I thought this was weird and at first I didn't notice this, so I started changing the script. When that didn't work, I just gave up and saved it. The next time I opened it and ran the program, it worked! I didn't get it. After trying to save it several times I noticed the pattern of working and not working. Do you have any suggestions for why this might have happened?

Offline

 

#2 2008-02-23 10:33:06

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Work and then doesn't!!!!

When Scratch is saved, it saves the state of all the sprites and variables as they were at that time.  If you are having troubles with a project as soon as it starts up, it is probably a problem with how you are initializing things.  It is important that every sprite and variable that you are using be set the way you want it to be on a Green Flag Hat script so that the project is starting from a known state.  For the sprites, you may need to set location and direction, costume, size, graphic state, pen color and so on, depending on how many of these items you change in the project.

It is good programming practice (in any language, not just Scratch) to make sure all your variables are initialized properly at the start of the program.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-02-23 11:20:01

Masterock
Scratcher
Registered: 2007-12-01
Posts: 16

Re: Work and then doesn't!!!!

thanks for the help, but I had bigger problems, They were in the right placings but the game was a quiz. If I saved it, then started the game, even if I got the right answer it would still give me the same response, that I got the wrong answer. If I saved it again and tried the same answer, it would work. I believe that is just a scratch bug, but maybe there is more to it...

Offline

 

#4 2008-02-23 14:27:59

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Work and then doesn't!!!!

Maybe you could put the project on the web?  It sounds like an interesting problem, it would be nice to be able to see it myself.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2008-02-23 18:08:23

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Work and then doesn't!!!!

Yes, please do that! This is a very interesting problem, and I would like to help if possible!


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#6 2008-02-24 17:29:36

Masterock
Scratcher
Registered: 2007-12-01
Posts: 16

Re: Work and then doesn't!!!!

I have it on the web, funny things is, I have two versions, one works and one doesn't. I will give you a link to the working one (which has less stuff) http://scratch.mit.edu/projects/Masterock/62550 and this is the one that has more but doesn't work http://scratch.mit.edu/projects/Masterock/62553 . Amd of I am correct, the working will reverse if downloaded(WARNING, you may think some stuff are glitches but really the game is based off of trick questions and stupid questions. The only way to make sure is if you try everything, if it still has a problem it means it is glitched(because of the work/not work problem).

Offline

 

Board footer