#Skript console error
1 messages · Page 1 of 1 (latest)
are you calling a dynamic function with an unset value by any chance
talking about non-reflect code*
you're not giving it enough parameters
you did not use that setup prior to 2.10
syntax there did not exist prior to 2.10
using script reflection
on inventory click:
set {_gui} to metadata "test" of player
set {_function} to function "%{_gui}%"
run {_function} with args (player, event-slot, event-inventory, (index of event-slot))
command test:
trigger:
open chest inventory with 3 rows to player
set metadata "test" of player to "TestClick"
function TestClick(player: player, item: item, inventory: inventory, slot: number):
broadcast "Clicked item: %{_item}% in slot %{_slot}% in inventory %{_inventory}% for player %{_player}%"
works fine
are you sure you're calling the right function
well at some point one of your arguments is going bad for whatever function you call
you'll want to broadcast the function and the arguments before running it
my guess is it happens when you click outside of the inventory window
hahahahahah fkng hell bro you are right, i just added a check for event-slot and the problem disappeared
but i still don’t get why this only started happening after switching to 2.10+
because there was changes to the function code
and it exposed code that was relying on assumptions that were no longer true
heyyyy lad, if it's not too much trouble, what i should to use for better result
.
or this example
just make sure the inputs aren't null