Skip to content

Do While acting like a Guarded While loop #8262

@JakeGBLP

Description

@JakeGBLP

Skript/Server Version

tested in skript 2.12.2 and 2.13.0

Bug Description

Not sure if this is unique to the right click event but when having a do while in it there can only be one of them running across all calls of this trigger

Expected Behavior

it shouldn't "guard" it

Steps to Reproduce

Load this snippet, then right click with a golden axe multiple times in the span of the do while (20 ticks in this case)
If you for example right click twice in succession it will broadcast the first random number 20 times but the second one wont be broadcasted at all because the while loop from the first call is not done yet.

on right click with golden axe:
  wait tick
  set {_random} to random integer between 1000 and 9999
  broadcast "TEST"
  do while {_a} is true: # when you right click multiple times with a golden axe this do while is never triggered until the one from the first click is finished
    broadcast {_random}
    wait tick
    set {_a} to whether loop-counter < 20

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.completedThe issue has been fully resolved and the change will be in the next Skript update.patch-readyA PR/issue that has been approved and is ready to be merged/closed for the next patch version.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions