Pryzmm Posted December 19, 2020 Share Posted December 19, 2020 (edited) How do i call a function while im calling it in a function The first part of the skript 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})] The second is a function being called in a function 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} EDIT: i don't get any errors but when i click the sword, it closes but dosent do anything Edited December 19, 2020 by AgentGamerPro Owner of Lifestealed, Labs, Encore, UNOfficially and Observed 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 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
Sh0ot Posted December 19, 2020 Share Posted December 19, 2020 first of all, you should use this gui slot format instead: format gui slot (slot) with (item) named "(name)" with lore "(lore) to run: #stuff this might be a potential fix to your problem, as skript (most of the time) doesnt allow you to put multiple different functions after one another if they are used in an inventory click situation. Try using the format i gave you above and it might work. Link to comment Share on other sites More sharing options...
Pryzmm Posted December 19, 2020 Author Share Posted December 19, 2020 (edited) 14 hours ago, Sh0ot said: first of all, you should use this gui slot format instead: format gui slot (slot) with (item) named "(name)" with lore "(lore) to run: #stuff this might be a potential fix to your problem, as skript (most of the time) doesnt allow you to put multiple different functions after one another if they are used in an inventory click situation. Try using the format i gave you above and it might work. "can't understand this condition/effect" EDIT: I fixed it, so im fine now Edited December 19, 2020 by AgentGamerPro see "EDIT" Owner of Lifestealed, Labs, Encore, UNOfficially and Observed 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 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
_iZ_ Posted December 22, 2020 Share Posted December 22, 2020 You can also do: format gui slot (slot) of (player) with (item info) to run function (function) Sorry, I couldn’t put that in a code box because there’s no support for that on phones. » IGN: _iZ_ « » Joined: 12/18/2016 « » VIP: 1/13/2018 « » Helper: 1/29/2021 « » [<3]: 5/8/2021 « » Skript dev « » Discord: iZz#0420 « React to this if I was helpful, found this interesting, or you're just nice 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