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

#1 2013-01-04 20:05:32

Pixainia
Scratcher
Registered: 2012-11-28
Posts: 71

Variables lose their value

I'm having a weird glitch that takes away variable value. Normally things hide when variable=1, and show when variable=2. But this makes it so that every single variable equals 0. Every script I make to change the variable does not work, and the variables still equal 0.

I also have a problem with broadcasts. They too do not work. One script broadcasts the message, but the receiving scripts do not activate it. I've tried deleting broadcasts and creating them with the same name, but that does not work.

If anyone can help me with these glitches it would be greatly appreciated. Thanks!

Offline

 

#2 2013-01-06 21:40:16

Pixainia
Scratcher
Registered: 2012-11-28
Posts: 71

Re: Variables lose their value

Can anyone help me with this glitch? I'm restarting the project I'm working on (The one that glitched) but I'm worried this might happen again.

Offline

 

#3 2013-01-06 23:22:20

dechan
Scratcher
Registered: 2012-12-20
Posts: 69

Re: Variables lose their value

These glitches you're talking about sound like classic "side-effect" issues (variable scoping) or a misunderstanding of how Scratch works with variables.

Link the project so someone can investigate please  smile

Offline

 

#4 2013-01-07 10:54:07

Pixainia
Scratcher
Registered: 2012-11-28
Posts: 71

Re: Variables lose their value

dechan wrote:

These glitches you're talking about sound like classic "side-effect" issues (variable scoping) or a misunderstanding of how Scratch works with variables.

Link the project so someone can investigate please  smile

I'm afraid I haven't uploaded the project yet. and I understand how variables work perfectly fine. I may be new(ish) to the website, but I was practicing in the program long before I got an account.

Offline

 

#5 2013-01-07 17:18:38

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Variables lose their value

It's difficult to help without the project available. You could upload it incomplete, or create a test account and upload it there (many people have test accounts, mine is benjamin2_test).


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

Offline

 

#6 2013-01-16 15:13:16

30-1
Scratcher
Registered: 2012-08-08
Posts: 100+

Re: Variables lose their value

this may be because you've exported the sprites that contain the variables


http://i.imgur.com/ocOya7x.gif
I. Text I Based I Games I

Offline

 

Board footer