Solved Function not working

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

WiebeHero

Active Member
Aug 23, 2017
135
5
0
23
So i have been using tuske gui manager for a while now but this wont work for some odd reason?

format gui slot 50 of player with paper named "&7Next Page" to run function openMenu()

function openMenu(p: Player, type: String):
if {_type} is "Enchantments 1/3":
open virtual chest inventory with size 1 named "Enchantments 2/3" to {_p}
Wierdly its not opening a virtual chest so if anyone could help me with this it would be great! :emoji_grinning:
 
So i have been using tuske gui manager for a while now but this wont work for some odd reason?

format gui slot 50 of player with paper named "&7Next Page" to run function openMenu()

function openMenu(p: Player, type: String):
if {_type} is "Enchantments 1/3":
open virtual chest inventory with size 1 named "Enchantments 2/3" to {_p}
Wierdly its not opening a virtual chest so if anyone could help me with this it would be great! :emoji_grinning:
are you sure {_type} is "Enchantments 1/3"? With a problem like this you should always broadcast the variable and/or put a broadcast after the condition to see if its true.
 
i was asking if you are sure that {_type} is "Enchantments 1/3" or else it will never run the code to open the inventory

is this how youre calling the function?
code_language.skript:
format gui slot 50 of player with paper named "&7Next Page" to run function openMenu()
if so then you need to call the function with arguments like so
code_language.skript:
format gui slot 50 of player with paper named "&7Next Page" to run function openMenu(player, "Enchantments 1/3")
 
Holy shit my man you did it THANK YOU SO MUCH!!!! oh and 1 more thing.
Know where i can find a addon wich lets you remove tags from items changing attack damage and renaming items? Still THANK YOU!!!!!
 
to rename an item you dont need an addon
code_language.skript:
set name of <insert item here> to "hey"

you can probably remove the tags using nbt which would need skstuff
 
Status
Not open for further replies.