Hiding Runtime error message with event Error occurred

Hi everyone! Hope this topic is in the right place, if not, any tip will be welcome

When using Kodular Companion for my project, sometimes the following error message shows up. Just sometimes, not always.

error segment

Besides i want to fix the problem (so very hard to me solving it), i want to use the event when screen error occurred
So, i was looking for hiding the error message, both here in the K Community and in google search which took me to MIT edu community. Nothing useful for me was found up.
Also, i visited the list of error codes here → Error codes - and what it means but i didn’t see any Runtime Error Segment code there

Anyway, I’ve tried to avoid the Runtime error message using the event in this way, trying to reinitialize my project screen

Even in this other way, to restart the same screen

error segment 3

Nothing is working to me, and the error mesagge keeps showing up…

So, any help/tip/advice… will be warmly appreciated.
Regards.

To fix the problem find the segment block in your blocks and add an if statement like this

If length of text > 5
Then use the segment block to extract the 6th letter of the text

Taifun

Thanks Taifun

I’m trying to do your tip, not easy cause the segment block is connected to the replacement slot from a replace item list block and i can’t see the way to do by now…

In the meanwhile, i’d like to know if the option with the event When Screen Error Occurred is possible or not for my error… thanks

Not possible
Taifun

1 Like

Ok thanks again

I’ll keep trying to solve it by blocks as in your tip

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

Ok. Hope this is useful, since i can’t know which of the blocks will be relevant for the community

Anyway, thanks in advance whatever is your comment

It looks like pos_LtrV was 6 when you got that error…
Rather than using another global variable for the length of the chosen name in your for each number loop, use the length block from the text drawer together with your global variable dato_nomb_Mont
I hope it makes sense what I’m suggesting…

Taifun

Ok got it, I’ll try it and will tell here

Thanks

As i tried in K Companion your suggestion is working fine!
Thanks!

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