Determining if 1st block is a C-slot

Ayyone got a method of finding out whether the 1st block of a script is a C-slot

e.g report true/false on these 2 examples

image

It's super easy if you know the input numbers for the c-slots.

Another great thing about this, is that ([slots V] of block (() @addInput)) already checks the first block, so you don't need to split it yourself.

Thank you :slight_smile:
encodeParse script pic
encodeParse script pic (1)

Just as matter of interest - are those numbers (5,15,18) documented somewhere?

I don't think the numbers are documented anywhere, I just got them by grabbing the slots of different blocks. 5 is the normal c-slot, 15 is the c-clot with the loop arrow, and 18 is the else if variadic c-slot (in the else block).

Good digging then :slight_smile:

I've turned your idea into a block

encodeParse script pic (2)
encodeParse script pic (3)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.