The above project is not working properly
Hello @atchudhan17, welcome to the forum!
Perhaps you would like to explain to the rest of us what you expect your code to do …
I see the problem.
The error is in this custom block:
Whenever you make a custom reporter or predicate, you need the custom block to report a value using this block:
You can enter any value into the block, like words, lists, numbers, and even True or False. Since you made a custom predicate, you need the block to report either True or False. Since your custom block doesn't do that, Snap! gets confused, sending out an error message, causing the code to stop, which is why it doesn't; run when you press space.
Also, just a side note...
In a script like this:
you don't actually need the equals sign, because the variable itself equals True. You can change it to this instead:
Also, welcome to the forum @atchudhan17 !
Or, more accurately, if (true) is a constant set to true, OP could simply use <true> rather than a variable:
if <<true>> { } @>
Better yet, just click on the boolean slot:
if <t>{ ...}@>
But also, I suppose, why not just do:
...
It is because
"true" might equal False
(sorry, I should have probably used "var" as the name)
That's why I said...
No worries!