Discuss Scratch

drmcw
Scratcher
1000+ posts

getParam question

When you have a custom block with parameters then within the JSON you have getParam tuples representing the parameters. The getParam tuple has 2 values the first is the name of the parameter, the second as far as I have seen has always been “r”, anyone any idea what this means?
DigiTechs
Scratcher
500+ posts

getParam question

drmcw wrote:

When you have a custom block with parameters then within the JSON you have getParam tuples representing the parameters. The getParam tuple has 2 values the first is the name of the parameter, the second as far as I have seen has always been “r”, anyone any idea what this means?
It's the kind of block it is. “ ” is for a stack block (as in, it executes code), “r” is for reporter and “b” (I THINK) is for predicate/boolean
drmcw
Scratcher
1000+ posts

getParam question

That makes sense. Thanks.
scimonster
Scratcher
1000+ posts

getParam question

DigiTechs wrote:

drmcw wrote:

When you have a custom block with parameters then within the JSON you have getParam tuples representing the parameters. The getParam tuple has 2 values the first is the name of the parameter, the second as far as I have seen has always been “r”, anyone any idea what this means?
It's the kind of block it is. “ ” is for a stack block (as in, it executes code), “r” is for reporter and “b” (I THINK) is for predicate/boolean
You can't have a stack parameter.

But yeah, i think it stands for reporter. If you make a boolean insert, it should be a “b”.
DigiTechs
Scratcher
500+ posts

getParam question

scimonster wrote:

DigiTechs wrote:

drmcw wrote:

When you have a custom block with parameters then within the JSON you have getParam tuples representing the parameters. The getParam tuple has 2 values the first is the name of the parameter, the second as far as I have seen has always been “r”, anyone any idea what this means?
It's the kind of block it is. “ ” is for a stack block (as in, it executes code), “r” is for reporter and “b” (I THINK) is for predicate/boolean
You can't have a stack parameter.

But yeah, i think it stands for reporter. If you make a boolean insert, it should be a “b”.
Yeah, I know what you mean; I'm trying to put it into words…

I could've just copied+pasted from nXIII's Extension thread.. but meh.

Powered by DjangoBB