Looking for a node +parser error

Hello.
I’m used to visual programming, but C++ is hard to me…
XOD was the best translation that I found.
It was quite hard to start XOD, due to lack of basic blocks (nodes), but I already figured it all out.

Now I’m looking for a node, that basically does not exist and seem hard to implement to me… but looks easy to do in mind: I want to have something like self-expanding node.
Sounds a bit like standard variadic, but it’s slightly different: what I want it to be, is that a number will tell the node how wide it should be (just like variadic, but going itself, depends on a given number).
By that, a user may -for example- just write how many sides the figure would be, and then write them (like in the string) - the program will process it, and make some calculations depending on -for egz.- the count of sides, and decision which figure is that (triangle, square, etc).
The problem would also be: how to make connections to all IN-pins, when extended…

It may be also a kind of variadic, but made for not only inputs, but also outputs (like copying the code 1:1)… or a kind of a copy-block, which will copy its insides&pins for the given number of times.

I don’t deny that I wanted to make a storage-shelf in this way also (like: store data in gate-res; then choose the number of gate to send out data [by adding all outputs])… but it would need a variadic pin counter, whis is linked to each gate somehow. I already have a gate-res node (gate, but if False, it sends out 0), but I was stopped there.
*by the way: why variadic stops me from putting one bool+one number IN’s, and one number OUT…?
I wanted to make a kind of variadic gate, but it didn’t agree…

I saw some array libraries made by some of you, and it would be also good - but I wanted something self-expanding. Only string-data operations are possible…?


Like:
I may create string-input, add couter of values into it, and then the program may begin working…

UPDATE:
Well, I tried.
I copied the “constant-string” box from the Tutorial project, and made on this example a saving-part of the magazine, for exactly 4 elements: it takes number values, processes them (with added counter - for the order), and format-number node; all using concat - and so the fake-json output was based on string - so it looks just like in the given example, but made for 4 numbers +1 word as a type option (I want to make 2 of them for 2 different things). Output from this saving-part is (4 egz.) this: {“boki”: [42.27, 162.40, 184.20, 0]}. It looks fine.

Then, I made next code-node to unpack it [and here I have an official Error]:

  1. buffer, to freeze that string in time during reading
  2. stream-string, to make it in byte
  3. parse-json, to make it readable within an order
  4. key to find if it’s my word
  5. nth and number value to read those numbers.

…and it all looks great; it even reads[!] constant-string nodes filled with it (even my string), when pinned directly to stream-string, BUT
Part 3 - parser got errors each time I’m using additional 1 concat to add even 1 right symbol to the end of a string.
I mean: even if I copy the original text {“name”: “Peter”, “age”: 20, “pets”: [“turtle”, “snail”] and add just one remaining } to the end with concat - the parser immediately strikes with an error, stopping all next nodes from reading.
I thought it may be because it’s somehow programmed to read constant strings, but… why it isn’t working when it gets a string that is constant during reading…?
How to make it work, finally…?

*and I’m still thinking about that second magazine, with numbers that may be added without a limit… but I’m quite confused even here, so I stopped at this one.

If someone knows how to solve it…?

PS.: Thanks A LOT in advance!!

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