Jump to content

Cant Find GUI Slot While In Function


AgentGamerPro

Recommended Posts

I can't seem to find the GUI slot while using the function. Heres my skript:

on right click on villager:
	if display name of villager is "Blacksmith":
		open chest with 3 rows named "&7&lSmithing GUI" to player
		... # other stuff here that dosent matter to the problem at hand
		format slot 14 of player with anvil named "&8&lSmithing Tool" with lore "&a", "&7Put a item in the empty slot", "&7and click the anvil.", "&a", "&7This will add a bonus to your", "&7selected item." , "&a" and "&c&lWARNING: IRREVERSIBLE" to run [SmithTest(player)]

function SmithTest(p: player):
	set {_u} to uuid of {_p}
	set {_Item} to slot 12 of {_p} # This is the line im having problems with
	if {_item} is not air:
		give {_p} {_item}
	else:
		send "&cWrong slot :/" to {_p}

I want to give the player an item when they add something to slot 12 OF THE GUI.

Edited by AgentGamerPro

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Try changing 

format slot 14 of player to format gui slot 14 of player

 

Edited by Chloe30k
  • Thanks 2
image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN ➣ Pickey ( Soon ) 
Joined MineHut ➣ January 7th 2019
Joined Forums ➣ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
Link to comment
Share on other sites

1 hour ago, Chloe30k said:

Try changing 


format slot 14 of player to format gui slot 14 of player

 

I edited my skript to show you where im hacing my problem. The formating i use works fine but in the function i can't call out the correct slot.

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Ehrm, why are you making a function anyways?

 

image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN ➣ Pickey ( Soon ) 
Joined MineHut ➣ January 7th 2019
Joined Forums ➣ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...