How do I make a custom reporting command block?

how do I make a custom reporting command block?
when I wrap it in call it seems to not return but, instead error

A command block runs a command, a reporter reports. The only exception is the report [] block, and that's all we need. There's no way to make a command block report, because that is not what it is designed for.

It actually was possible to do this in previous versions, but it was removed because of the reasons I mentioned above.

as in stackable reporters

It's still not possible. I should also mention that @bh has talked about making all blocks reporters and be able to be stacked, however that would require a major redesign. In the current state of things, command blocks that report is not possible, and I don't see it being added anytime soon.

I done it,It doesn't work with block combining

use a run block

how doesn't it? can you share an example of what didn't work?

try using join on a ring with a reporting command and call it

please give an example. what do you mean?

({} >) is an empty ring
(call (join ({|reporting command|} >))>) throws an error

use
untitled script pic (4) or untitled script pic (3) for what you want, depending on what you want. use the first in block definitions, but the second in normal scripts.

(Also, you should use snapblocks or script pics, rather than plain text like

).

(call (join ( {reporter command} >))> ::control)

errors

I really don't understand the script.

Regarding the snapblocks here, you can use @> and @:> for input arrows:
(call (join ( {reporter command} @>))@:> ::control)

(call (join ( {reporter command} @>))@:> ::control)

To begin, I am going to assume that this is your setup:


The first thing I would like to address is what you expect the join block to do. The join block is for constructing programs on the fly:
untitled script pic (12)
In this case, the call block is receiving the command block just like it would have if you had put it in directly:

Here we come to a fundamental reality of Snap!: reporters report, and commands do not. This block still does not report anything because it is still a command.

Here is a workaround that does work (although why you would want this is still beyond me) - it uses continuations. To begin, let me show you what continuations are:


A continuation is whatever is left to do in a program. We can then run a continuation. Here is an example:

The continuation is recorded by the catch block and then jumped to by the throw block. This also works for reporters:

The blank space is left to be filled by whatever the "say continuation" block reports:

This can be used in more complex situations like this:

However, it also has a side effect - it can allow commands to report.

I would not recommend this - it could be patched in an update and is likely to cause confusion. However, I believe I saw an instance where this could be helpful (using blocks as a replacement for text programming). Thus, I am still telling you about it :).

run ( {report [text here]} @>) @> //use this  as the block definition

Okay, now that is a bug! I seriously don't know why that works.

doStopCustomBlock also does the same to a ring and popContext exits the ring so, the run block is gaurding the custom block