I'm trying to make a decrease <variableName> block, that decrease the given variable by -1.
My goal is to make a custom block that do it, not to use the block change <varName> by -1.
I would like to put a slot menu for choosing the variable name inside the custom block decrease var.
Is this possible ?
Suppose you put a SAY (NAME) at the end of your script. Then you call your DECREASE block with the input 5. So you start out with NAME=5, and then you CHANGE [NAME] BY (-1). What would you expect the SAY block to say? "4," right?
Now call your block with the input FOO. So you start out with NAME=FOO and you try to subtract 1 from that value, and it doesn't work because the value is a word rather than a number.
I think, attempting to read your mind, that you think putting the block in the Variables category (the orange blocks) gives it some special variable-nature. Or you think that because you called the input NAME, Snap! will realize that you meant it to be the name of a variable and "do the right thing." But no, it tries to do the same thing it did for 5, which doesn't work.
So it's not so much a "decision," as you label it, but rather just a working-out of the way things happen in the absence of a decision. Except for the decision not to allow putting variable ovals in those slots at all, since everyone gets so confused about it. The people who learn not to be confused can use the CALL WITH INPUTS form.