Another Coding Issue

Once again having an issue. (Sorry, I'm not extremely smart, and I don't recognize any form of syntax errors.)

So, I'm trying to create a debug block that will add a log to a list by combining the type of log and the logged text into one line. However, the script always stops at the second join block with this error that it might take me a lifetime to understand, and it doesn't help me at all. In fact, no matter how i change the script, it gives me the same error, and my lack of understanding makes it seem like one of those projects on Scratch made by a 5 year old in Mexico. (Oddly specific, I know.)

Here's the screenshot, and if you can help, please do because this is kind of annoying and it makes no sense. Thanks.


(Don't mind the different join blocks in the error and in the script, I didn't save the block before running it for the screenshot.)

Can you export your custom log block as a script pic please so we can load it in and try it out

untitled script pic - 2023-04-12T222754.684

Block Library script pic (1)

wait wrong one

You should create a global variable named "logs". Then set that to a list. From there, you can just add an item to the list to add a lot. You do not need to join the logs variable at all, and you don't need to use the primitive block to create a variable.

(Excuse the fact that this block doesn't look like yours)

You do not need the type input to be a ring input, instead use any or text.

The problem you're having is, you're trying to join a ring with text. It wouldn't error for the second join, if the type input had a block that has 2 inputs, but it would probably error with the first join. It would error, because you're trying to join a list / text with a block. And also, putting it in a list block, then setting the variable to the list, won't add it to the list, in fact, it's replacing the value that the variable already has.

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