#The 'argument' can only be used in a script command or command event

1 messages · Page 1 of 1 (latest)

hollow lotus
#

I am trying to make a gui when you try to take an item, it tps the item back so you can't take it. so I tried this:
on inventory click: # when player clicks inventory
if name of event-inventory is "&8Player Stats: %arg-1%": # name of the inventory
cancel event # stop them from getting 2
I knew it was right but it then said The 'argument' can only be used in a script command or command event so can anyone help me???? Because I need the %arg-1% in it unless it won't work

subtle moon
#

Arguments are only in script commands it is as the error says

hollow lotus
subtle moon
#

What is the arg supposed to be?

#

Nvm I’m going to sleep ask someone else to help you

hollow lotus
#

ok

marble escarp
#

its simple

#

set a var to an argument during the command and use the var later

#

it has to be global

#

and i would delete it once you were done with it

obtuse jacinth
#

#command | arg-1 | arg-2
command /test [<text>] [<text>]:
trigger:
# code

#

Hopefully that helps a little

obtuse jacinth
hollow lotus
obtuse jacinth
#

if event-inventory display name contains "Player Stats"