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

#1 2010-08-04 18:11:51

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Variable not working

So, I'm working on a project, and I have when sprite clicked, set options to 1, then on a few other sprites, I have forever, if options = 1, hide or switch to costume x
The thing is, it doesn't work. I've even had 2 people look at my project, and it didn't work on their computers either, but according to them, the scripts were the way they should be. What do I do about this?


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#2 2010-08-04 18:21:51

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: Variable not working

Do you have the project online? Maybe others might be able to spot something the other two people missed.  smile


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#3 2010-08-04 19:56:45

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Variable not working

What you're saying kind of does not make any sense. Could you post a picture of the scripts or upload the project? Or explain clearer?


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#4 2010-08-05 06:36:06

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Variable not working

I don't know how to explain it any clearer
Variable says to do something, other sprites don't do it.
And it's not an error with coding, it's some glitch with my project.


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#5 2010-08-05 21:17:14

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Variable not working

Revive
I'll get some images


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#6 2010-08-06 02:16:37

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Variable not working

Is it a local variable instead of a global variable?


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#7 2010-08-06 07:42:07

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Variable not working

No, all my variables are global : (


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#8 2010-08-06 09:07:58

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

Re: Variable not working

Blade-Edge wrote:

No, all my variables are global : (

I suggest you post the project, or a piece of the project showing the problem.  Then we can take a look at it and maybe see the problem.


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

Offline

 

#9 2010-08-06 09:33:02

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: Variable not working

Paddle2See wrote:

Blade-Edge wrote:

No, all my variables are global : (

I suggest you post the project, or a piece of the project showing the problem.  Then we can take a look at it and maybe see the problem.

Well, it's for the Scratch Olympics
I can show you the pictures though

http://img256.imageshack.us/img256/9803/glop1.gif
The title screen logo
http://img814.imageshack.us/img814/6247/glop3.gif
Play button
http://img231.imageshack.us/img231/4935/glop4.gif
Options button
http://img716.imageshack.us/img716/484/glop6.gif
The stage

It's the option variable


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#10 2010-08-06 21:10:43

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Variable not working

Can you verify what Sprite5, background4, background2 and floor4 are?


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#11 2010-08-07 13:59:07

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

Re: Variable not working

it happens quite often to me - try replacing the variable reporters and tell me if it works  smile

Offline

 

#12 2010-08-19 11:12:50

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Variable not working

Have you fixed the problem yet, Blade?


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#13 2010-08-19 12:11:55

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Variable not working

Well, the olympics are over. I assume this isn't really needed?


Hai.

Offline

 

#14 2010-08-19 14:06:51

BaronVonBlade
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Variable not working

I didn't fix it  sad
But we took out the options menu anyway


http://img820.imageshack.us/img820/6055/imagevxqx.jpghttp://img820.imageshack.us/img820/6055/imagevxqx.jpg

Offline

 

#15 2010-08-20 00:24:57

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Variable not working

Oh I see.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#16 2010-08-20 16:43:05

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Variable not working

If it is the 'options' variable, does the menu start with 'start game' as 1?
If so, then I do not know, else, remove the script:
[blocks]<when green flag clicked>
<forever>
<if><( start game <=> 0 )>
<set{ options }to( 0
<end>
<end>

Offline

 

Board footer