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 368 forks source link

is not VS isn't #7010

Open EwansXD opened 2 weeks ago

EwansXD commented 2 weeks ago

Skript/Server Version

[22:47:06 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[22:47:06 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[22:47:06 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[22:47:06 INFO]: [Skript] Server Version: git-Paper-"f4c7d37" (MC: 1.20.4)
[22:47:06 INFO]: [Skript] Skript Version: 2.9.1 (skriptlang-github)
[22:47:06 INFO]: [Skript] Installed Skript Addons: 
[22:47:06 INFO]: [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[22:47:06 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[22:47:06 INFO]: [Skript]  - SkBee v3.6.1 (https://github.com/ShaneBeee/SkBee)
[22:47:06 INFO]: [Skript] Installed dependencies: 
[22:47:06 INFO]: [Skript]  - WorldGuard v7.0.9+5934e49

Bug Description

This works: make {_e} disappear from (all players where [input is not {_p}]) This does not work: make {_e} disappear from (all players where [input isn't {_p}])

Expected Behavior

isn't should work as an alias of is not, may just be me but it took me a while to figure out as it can be used in other places.

Steps to Reproduce

Use isn't instead of is not.

Errors or Screenshots

No response

Other

Small thing that would save headache, wouldn't break anything by adding.

Agreement

sovdeeth commented 2 weeks ago

isn't should act the exact same as is not. Can you provide an actual snippet we can reproduce with? The lines you sent rely on unknown variables and addon syntaxes.

EwansXD commented 1 week ago

Aplogies for the delayed response, here is a code snippet you can use to re-create the issue i was having:

function damageDisplay(u: player, mob: entity):
  if {_mob} is alive:
    set {_damage} to long tag "custom;damage" of nbt of {_mob}
    set {_tier} to string tag "custom;tier" of nbt of {_mob}
    set {_health} to health of {_mob}
    damage {_mob} by {_damage}
    set the display name of {_mob} to "%{_tier}%%{_mob}% &4❤&c%nFormat({_health})%" in proper case
    set {_loc} to {_mob}'s location ~ vector(random number from 0.5 to -0.5, 1.3, random number from 0.5 to -0.5)
    play sound "ENTITY_PLAYER_ATTACK_WEAK" with volume 1 with pitch 2 at {_u} for {_u}
    add 1 to {hits::%{_u}%}

    if {damage::%{_u}%} > {_health}:
      set {_display} to {_health}
    else:
      set {_display} to {damage::%{_u}%}

    spawn text display at {_loc}:
      set display text of entity to "&4⚔&c&l%nFormat({_display})%"
      set display teleport duration of entity to 40
      set display text background color of entity to bukkitColor(0,1,1,1)
      set display billboard of entity to center
      set {_e} to entity
    make {_e} disappear from (all players where [input is not {_u}])
    teleport {_e} to {_e} ~ vector(0, 2, 0)
    wait 40 ticks
    kill {_e}
sovdeeth commented 6 days ago

Thanks, i'll test with that. In the meantime, can you update skript-reflect to 2.5.1 and see if that helps? 2.4 technically isn't compatible with skript 2.9