AgentGamerPro Posted December 17, 2020 Share Posted December 17, 2020 (edited) function BuyDirt(p: player): if {DirtPurchased.%{_p}%} is not set: # makes it so you can only purchase once if {balance::%{_p}'s uuid%} >= 20000: # check if player has sufficent balance set {DirtPurchased.%{_p}%} to true # makes it so you can only purchase once remove 20000 from {balance::%{_p}'s uuid%} # removes money from balance make console execute command "SetBooster %{_p}% 2" # sets players boost from console else: send "&4&lError: &cInsufficent Balance!" to {_p} # message saying not enough money else: send "&4&lError: &cYou already purchased this!" to {_p} # message saying already purchase Im having trouble with this. When i click a GUI item its supposed to do this, yet it dosent. Heres the line: format slot 0 of player with dirt named "&7&lDirt Boost" with lore "&7This booster multiplys", "&7money by 2!" and "&6Cost: 20000" to run [set {DirtPP.%player%} to true] Edited December 17, 2020 by AgentGamerPro 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 More sharing options...
quick007 Posted December 17, 2020 Share Posted December 17, 2020 use "to close then run" Link to comment Share on other sites More sharing options...
AgentGamerPro Posted December 17, 2020 Author Share Posted December 17, 2020 (edited) 1 minute ago, quick007 said: use "to close then run" dosent work What i mean is the function dosent work Edited December 17, 2020 by AgentGamerPro 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 More sharing options...
quick007 Posted December 17, 2020 Share Posted December 17, 2020 oohhhhhhh any errors? Link to comment Share on other sites More sharing options...
_Tarna_ Posted December 17, 2020 Share Posted December 17, 2020 You need to do set {_u} to {_p}'s uuid and use {balance::%{_u}%} instead. You have to do this when getting the uuid of a variable in another variable. In your skript, you use {balance::%{_p}'s uuid%}. Change it to what I said and it should fix it. 1 Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
AgentGamerPro Posted December 18, 2020 Author Share Posted December 18, 2020 thanks turns out i didn't call for the function 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 More sharing options...
AgentGamerPro Posted December 18, 2020 Author Share Posted December 18, 2020 10 hours ago, _Tarna_ said: You need to do set {_u} to {_p}'s uuid and use {balance::%{_u}%} instead. You have to do this when getting the uuid of a variable in another variable. In your skript, you use {balance::%{_p}'s uuid%}. Change it to what I said and it should fix it. I have another question tho. How do i call for a function in a function? Here are my 2 peices of skript: (first one is in a function) format slot 11 of {_p} with wooden sword named "&f&lWooden Sword" with lore "" and "&6300 Coins" to close then run [BuyWoodSword({_p})] function BuyWoodSword(p: player): set {_u} to uuid of {_p} if {balance::%{_u}%} >= 300: remove 300 from {balance::%{_u}%} give wooden sword to {_p} send "&aSuccessfully purchased &2Wooden Sword!" to {_p} else: send "&4&lError: &cInsufficent Balance!" to {_p} 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 More sharing options...
blocksnmore Posted January 4, 2021 Share Posted January 4, 2021 On 12/17/2020 at 8:13 PM, AgentGamerPro said: I have another question tho. How do i call for a function in a function? Here are my 2 peices of skript: (first one is in a function) format slot 11 of {_p} with wooden sword named "&f&lWooden Sword" with lore "" and "&6300 Coins" to close then run [BuyWoodSword({_p})] function BuyWoodSword(p: player): set {_u} to uuid of {_p} if {balance::%{_u}%} >= 300: remove 300 from {balance::%{_u}%} give wooden sword to {_p} send "&aSuccessfully purchased &2Wooden Sword!" to {_p} else: send "&4&lError: &cInsufficent Balance!" to {_p} Just do functionname(params) inside of said function Link to comment Share on other sites More sharing options...
AgentGamerPro Posted January 6, 2021 Author Share Posted January 6, 2021 (edited) post is dead... y u post Edited January 6, 2021 by AgentGamerPro 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now