Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Feedback
  3. Feature request: try and catch blocks or stopping code if it takes to long to do

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

Scheduled Pinned Locked Moved Feedback
feature-request
3 Posts 2 Posters 961 Views 2 Watching
  • 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.
  • JaecadeJnightJ Offline
    JaecadeJnightJ Offline
    JaecadeJnight
    Mod Helper
    wrote on last edited by jeffreyrb03-gmail
    #1

    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_T 1 Reply Last reply
    0
    • JaecadeJnightJ JaecadeJnight

      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.

      Tyller_T Offline
      Tyller_T Offline
      Tyller_
      trusted helpers
      wrote on last edited by Tyller_
      #2

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

      JaecadeJnightJ 1 Reply Last reply
      1
      • Tyller_T 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

        JaecadeJnightJ Offline
        JaecadeJnightJ Offline
        JaecadeJnight
        Mod Helper
        wrote on last edited by
        #3

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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • CreatiCode