Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Loops dont continue after reloading skript

Open ShadowKlassic opened this issue 1 year ago • 5 comments

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

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

ShadowKlassic avatar Feb 21 '24 20:02 ShadowKlassic

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

ShadowKlassic avatar Feb 21 '24 20:02 ShadowKlassic

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

sovdeeth avatar Feb 21 '24 20:02 sovdeeth

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

ShadowKlassic avatar Feb 22 '24 18:02 ShadowKlassic

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.

sovdeeth avatar Feb 22 '24 18:02 sovdeeth

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

ShadowKlassic avatar Feb 22 '24 20:02 ShadowKlassic

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

sovdeeth avatar Feb 24 '24 14:02 sovdeeth

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

ShadowKlassic avatar Feb 24 '24 15:02 ShadowKlassic

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.

sovdeeth avatar Feb 24 '24 15:02 sovdeeth

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

ShadowKlassic avatar Feb 24 '24 15:02 ShadowKlassic

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.

sovdeeth avatar Feb 24 '24 15:02 sovdeeth