Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Feature request: try and catch blocks or stopping code if it takes to long to do

    Feedback
    feature-request
    2
    3
    225
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by jeffreyrb03-gmail

      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.

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      Tyller_ 1 Reply Last reply Reply Quote 0
      • Tyller_
        Tyller_ Best Forum Helpers @jeffreyrb03-gmail last edited by Tyller_

        @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

        <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
        </div>

        jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
        • jeffreyrb03-gmail
          JaecadeJnight Mod Helper @Tyller_ last edited by

          @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.

          #LLJW
          <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

          1 Reply Last reply Reply Quote 0
          • First post
            Last post