command /testfunction:
trigger:
testfunction(executor)
function testfunction(e: offline player):
{_e} doesn't have tnt
send "notnt" to {_e}
not returning value also if executor has tnt
the same for the opposite (has)
Duplicate of https://github.com/SkriptLang/Skript/issues/1287, also there is a workaround ^^
I don't need to return boolean values ._.
This was just a testfunction, but in the real one where I also have this problem and I won't split it in 1921482194215219581952189 functions that return a boolean so that I also have to manage the response to these boolean if true in all events where I use these 192418521952195912 functions xD
Really man, it must work, can bensku fix this in next version release and soon please? c.c
🤦♀️ go to https://github.com/SkriptLang/Skript/issues/1287 and read
Readed, doesn't work.
Get my workaround code there and use it for now.
command /hi:
trigger:
set {_x} to player
if {_x} has stone:
message "yes"
else:
message "no"
The problem is that in CondContains the container is a CraftPlayer, aka it's neither an Inventory nor a String nor a Variable, and a default return false; at the end of the check method is executed
"%inventories% ha(s|ve) %itemtypes% [in [(the[ir]|his|her|its)] inventory]" (no expressions that accept multipe types). There is an Entity -> Inventory converter, but I believe the following line causes it to be ignoredThis issue should be reopened.
Re-opened and labelled, thanks for the analysis Nico.
I think this is fixed? When i use the code of Nicofisi and do /hi without having stone i get "no".
When i have stone it says yes. So i think its fixed?
Tested both Nico's command as well as Sitieno's command, both work.
Im guessing this was fixed somewhere along the line.