GithubHelp home page GithubHelp logo

Comments (4)

TheBentoBox avatar TheBentoBox commented on June 5, 2024

Out of curiosity, could you try doing "wait for 0.04 seconds" and see if it rounds down to 0?

from skript.

TheBentoBox avatar TheBentoBox commented on June 5, 2024

You're right about what the issue is. I think it's impossible for Skript (or any plugin) to do anything in smaller increments than 1/20th of a second. Minecraft doesn't process things quicker than that, so you can't make it do anything quicker than that.

from skript.

bensku avatar bensku commented on June 5, 2024

As far as I know, Skript runs even delayed tasks in main thread. Minecraft is not thread safe, excluding the chat, and with Spigot even that is not thread safe.

I will see if I can make it report clear error, though.

from skript.

TheBentoBox avatar TheBentoBox commented on June 5, 2024

Currently, we are still able to write something like wait 0.5 ticks, which there probably should be as it's impossible. Recommend that, when given a timespan in ticks, the provided amount is run through a ceil, with a warning (not error) provided. Something like Warning: you can only wait a whole number of ticks. Rounding up to %ceil(ticks)%. Obvious pseudocode there within the %'s but you get the idea.

Tagging as enhancement because this isn't exactly a bug, but a better error would be an improvement (and rounding up will prevent crashes if people have a big loop with wait 0.5 ticks expecting there to be some sort of delay between iterations).

from skript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.