I wrote a most basic logic block. However, to my frustration, it just doesn't work.
http://scratch.mit.edu/projects/shsh/890805
Here is the script:
Define a variable a,
Set a to 1
If a=1
increase a by 1
else
increase a by 3
endif
To my amazement, the else block is always executed, but not the if block.
Could somebody figure this out and tell me why?
Thanks,
Offline
I see what the problem is.
This is your script right now:
In scratch, to test a variable in an = block you have to go to the variables section, drag out the round block with the name of the variable (in this case, "a") and drop it into the left side. Typing the name of the variable doesn't work.
The new script should look like this:
Also, you don't need the "show variable" block. That's just to show/hide the variable on-screen, and since it's already showing, it's not really doing anything.
Last edited by hmnwilson (2010-02-16 14:35:34)
Offline
It's already resolved, the rest might be something he's doing on purpose.
Offline