Hi,
I'm not sure why this happened, but after updating to dev37b, one of my scripts, water.sk, started giving errors apparentely about the use of a specific local variable in a specific function event.
Here's part of the code:
And this is the error:
Apparentely Skript thinks the variable {_player} is an itemstack and not a player as how it's clearly declared in the function declaration. Another thing that's curious is that the error is only given when the variable is used in send effects, as for example when I was trying to set the variable {_uuid} to the UUID of {_player} it worked just fine.
I'm pretty sure this is something they've messed up on Skript's most recent update, dev37, as its changelog contained something along the lines of "added local variable type hints". I could be sounding completely stupid, I have no idea what they mean with "hints" and may not be related to this at all.
Any thoughts?
EDIT: And yes, before I updated to dev37 the entire script was 100% error/warning free.
I'm not sure why this happened, but after updating to dev37b, one of my scripts, water.sk, started giving errors apparentely about the use of a specific local variable in a specific function event.
Here's part of the code:
code_language.skript:
function cjwVictoryHandler(player: player):
set {_match} to {cjw::onGoing}
"%{_player}%" is not "Sensei"
set {_uuid} to uuid of {_player}
if {cjw::onGoing} is not "sensei":
add 1 to {WinsWater::%{_uuid}%}
wait 1 second
if {_match} is "sensei":
"%{masteredElements::%{_uuid}%::*}%" does not contain "water"
amuletHandler({_player}, "water")
add "water" to {masteredElements::%{_uuid}%::*}
execute console command "/execute %{_player}% ~ ~ ~ /playsound minecraft:entity.player.levelup ambient %{_player}% ~ ~ ~ 10 0.6"
send "" to {_player}
send "&6&m-----------------------------------------" to {_player}
send "&9&lParabéns, pupilo ninja. É agora Ninja da Água." to {_player}
send "&6&m-----------------------------------------" to {_player}
send "" to {_player}
if {WinsWater::%{_uuid}%} is 10:
give unbreakable leather boots with nbt "{display:{color:4488894},HideFlags:6}" named "Sandálias Correnteza" with lore "Card-Jitsu Água" to {_player}
console command "/execute %{_player}% ~ ~ ~ /playsound entity.player.levelup voice %{_player}%"
send "" to {_player}
send "&7&l[Sensei] &fMuito bem pupilo!" to {_player}
send "&7&l[Sensei] &fPinguim recebe &9&lSandálias Correnteza." to {_player}
send "&7&l[Sensei] &fSensei espera que pinguim continue assim." to {_player}
send "" to {_player}
And this is the error:
Apparentely Skript thinks the variable {_player} is an itemstack and not a player as how it's clearly declared in the function declaration. Another thing that's curious is that the error is only given when the variable is used in send effects, as for example when I was trying to set the variable {_uuid} to the UUID of {_player} it worked just fine.
I'm pretty sure this is something they've messed up on Skript's most recent update, dev37, as its changelog contained something along the lines of "added local variable type hints". I could be sounding completely stupid, I have no idea what they mean with "hints" and may not be related to this at all.
Any thoughts?
EDIT: And yes, before I updated to dev37 the entire script was 100% error/warning free.
Last edited: