Feature request: try and catch blocks or stopping code if it takes to long to do
-
I want to have greater control over the running of blocks, like maybe adding try and catch (to catch errors), but mainly extra control over “do this and wait ( )” blocks. For example, this attribute could be added to the ask block and “send message () and wait”
It would go like:
“send message () and wait ()”
and basically if you fill in the wait input, that block will take that amount of seconds to execute, or less if the code finishes faster, and if that code isn’t done running, then it will just quit running it and stop it. These blocks right now will just wait until the code is done executing (if you choose the wait one), but there are times when you need it to wait until it’s done but you also don’t want it to take too long. -
@jeffreyrb03-gmail for the try and catch block, I understand why you would want that (time outs) I made that when read url and load data blocks waited forever if they weren’t valid, you set a variable to like 0 then boradcast a message, the message runs some code and then sets the variable to 1 or changers it based on how far it gets, then after however many seconds in main script you stop other scripts in sprite and check what the variable is
Edit /
PS: I don’t have anything to do, so if you want some help on youniverse or something else I’d love to help, just bored rn -
@tyller_ Ohh, that’s pretty clever! I was thinking about using a sprite for that in the way you said but it felt sort of redundant to put a small amount of code in a sprite and make whole new messages and variables just for that simple function.
I haven’t been working on YN3D lately because I’m a bit burnt out, instead working on my iFrame net browser project. I’m using this so that if you try to go to a URL, it will check if its safe first with the read URL as markdown block and here: https://transparencyreport.google.com/safe-browsing/search?url= (url) . However, this takes too long sometimes, so I just wanna make it if it takes too long to run that code then it just stops.