SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.06k stars 367 forks source link

where filter erase loop-values #6240

Open rudde0 opened 9 months ago

rudde0 commented 9 months ago

Skript/Server Version

[15:18:01 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[15:18:01 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[15:18:01 INFO]: [Skript] Server Version: git-Purpur-2095 (MC: 1.20.2)
[15:18:01 INFO]: [Skript] Skript Version: 2.7.2 (skriptlang-github)
[15:18:01 INFO]: [Skript] Installed Skript Addons:
[15:18:01 INFO]: [Skript]  - Beamer v1.0.4
[15:18:01 INFO]: [Skript]  - PoaSK v2.9
[15:18:01 INFO]: [Skript]  - skript-yaml v1.5
[15:18:01 INFO]: [Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
[15:18:01 INFO]: [Skript]  - Skript-Packet v2.1.2 (www.github.com/Anarchick/skript-packet)
[15:18:01 INFO]: [Skript]  - skDragon v0.18-alex-MC1.20.2-hack-5
[15:18:01 INFO]: [Skript]  - skript-db v1.3.4
[15:18:01 INFO]: [Skript]  - Skungee v2.0.0-BETA-3
[15:18:01 INFO]: [Skript]  - SkQuery v4.1.9
[15:18:01 INFO]: [Skript]  - TuSKe v1.8.2-Pikachu-Patch-3 (github.com/Tuke-Nuke/TuSKe)
[15:18:01 INFO]: [Skript] Installed dependencies:
[15:18:01 INFO]: [Skript]  - Vault v1.7.3-b131
[15:18:01 INFO]: [Skript]  - WorldGuard v7.0.10-SNAPSHOT+2260-c7319f1
[15:18:01 INFO]: [Skript]  - GriefPrevention v16.18.1-9-g4a3d65b-dirty

Bug Description

"where" keyword makes impossible to get "loop-value".

Expected Behavior

it should get loop-value just like without where keyword. This bug doesn't exist on Skript 2.6.4.

Steps to Reproduce

Just add this code,

function hello():
    loop all players where [name of player input contains "a"]:
        send "hello!" to loop-value

this will print the error below:

There's no player/console in a function event
Line: send "hello!" to loop-value

and this will work without any error:

function hello():
    loop all players:
        send "hello!" to loop-value

Errors or Screenshots

No response

Other

No response

Agreement

AyhamAl-Ali commented 9 months ago

Try [name of input contains "a"] if that works and probably will then it means either player input is wrongly parsed or it's intended originally which I don't think it is.

rudde0 commented 8 months ago

Try [name of input contains "a"] if that works and probably will then it means either player input is wrongly parsed or it's intended originally which I don't think it is.

It's working with the way that you advised. Should I close the issue?

AyhamAl-Ali commented 8 months ago

It's working with the way that you advised. Should I close the issue?

Good to hear. We should keep it open until we investigate a little more on this. Thank you for reporting issues :)