#Skript console error

1 messages · Page 1 of 1 (latest)

bitter topaz
#

send the full error

bitter topaz
#

are you calling a dynamic function with an unset value by any chance

#

talking about non-reflect code*

swift kindle
#

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

strange current
#

but i still don’t get why this only started happening after switching to 2.10+

swift kindle
#

because there was changes to the function code

#

and it exposed code that was relying on assumptions that were no longer true

strange current
#

.

#

or this example

swift kindle