Skript

Skript

743k Downloads

Loops dont continue after reloading skript

ShadowKlassic opened this issue ยท 10 comments

commented

Skript/Server Version

[15:19:00 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[15:19:00 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[15:19:00 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[15:19:00 INFO]: [Skript] Server Version: git-Paper-404 (MC: 1.19.3)
[15:19:00 INFO]: [Skript] Skript Version: 2.8.2 (skriptlang-github)
[15:19:00 INFO]: [Skript] Installed Skript Addons: 
[15:19:00 INFO]: [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[15:19:00 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[15:19:00 INFO]: [Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
[15:19:00 INFO]: [Skript]  - SkQuery v4.1.10
[15:19:00 INFO]: [Skript]  - SkBee v2.7.4 (https://github.com/ShaneBeee/SkBee)
[15:19:00 INFO]: [Skript] Installed dependencies: 
[15:19:00 INFO]: [Skript]  - Vault v1.7.3-b131
[15:19:00 INFO]: [Skript]  - WorldGuard v7.0.8+33cdb4a

Bug Description

When I reload a skript with an on join while player is online loop, the loop doesn't continue like it used to do (i came from 2.6.4 and it used to work the way i liked).

Expected Behavior

Loops are supposed to continue when restarting

Steps to Reproduce

Make a while loop on join event that spams something in chat then reload the skript. It will stop

Errors or Screenshots

No response

Other

No response

Agreement

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

I've just added and updated all my addons. Its still happening to me. my server is on paper 1.19.3

[13:09:14 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[13:09:14 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[13:09:14 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[13:09:14 INFO]: [Skript] Server Version: git-Paper-404 (MC: 1.19.3)
[13:09:14 INFO]: [Skript] Skript Version: 2.8.2 (skriptlang-github)
[13:09:14 INFO]: [Skript] Installed Skript Addons:
[13:09:14 INFO]: [Skript] - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[13:09:14 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[13:09:14 INFO]: [Skript] - SkQuery v4.1.10
[13:09:14 INFO]: [Skript] - SkBee v3.3.0 (https://github.com/ShaneBeee/SkBee)
[13:09:14 INFO]: [Skript] Installed dependencies:
[13:09:14 INFO]: [Skript] - Vault v1.7.3-b131
[13:09:14 INFO]: [Skript] - WorldGuard v7.0.8+33cdb4a

commented

Please provide a minimum reproducible example that we can recreate the issue with, without addons. We can't do much if all we're going off is guesswork and we're unable to replicate it.

commented

If you take out the functions and global variables. It still does it

commented

If you take out the functions and global variables. It still does it

As I said above, please take out everything you can that doesn't affect it, and only send us the minimum needed to replicate it. I'll try to replicate with that.

commented

Ok I found how you can recreate it. Heres a part of my code. This is the ONLY part of my code that does this(as in doesn't continue after reloading)

https://paste.gg/p/anonymous/d5ab79e4753e409f999c07522f7aa775

commented

Ok I found how you can recreate it. Heres a part of my code. This is the ONLY part of my code that does this(as in doesn't continue after reloading)

https://paste.gg/p/anonymous/d5ab79e4753e409f999c07522f7aa775

I think you sent the wrong link. That's the same code with the same reliance on global variables you have set, and same functions you wrote, that we can't duplicate.

commented

Since the code you sent relies on variables and functions you didn't provide, it can't be tested by others. A minimum reproducible example is the smallest bit of code that you can write that still causes the same effect. If you keep having this issue, please narrow it down to the bare minimum cause and show us that, please.

Since I can't test with your code, here's the code I did test with and could not replicate the issue with:

on join:
    while player is online:
        broadcast "%player% is online"
        wait 5 ticks

image

commented

I dont like having to kick players and having them rejoin just for the loops to continue working.

commented

Can't replicate on 2.8.2 with the following code.
It's likely something to do with your specific code or addons.

on command "test":
    while true is true:
        broadcast "test"
        wait 1 tick