Ikey Posted March 27, 2021 Share Posted March 27, 2021 Hey, I have been having issues with GUI and Buying from it. I am trying to make a boss GUI that you can buy to fight. Here is the skript right now: command /openboss: trigger: open virtual chest inventory with size 3 named "&c&lBoss" to player format gui slot 11 of player with diamond sword named "&c&lFight The Boss" with lore "&a&oThis will cost 50k" run: if {%player%bal} contains "50000": execute console command "/say &c&l%player% Is now fighting the Boss!" execute console command "/eco take %player% 50000" else: send "&cYou need $50000 for that!" anyone know whats wrong? please help me Owner of ikeysurviv.minehut.gg ⊱------------------------------⊰ [LEGEND] on Minehut ⊱------------------------------⊰ In-game name - ikeyIX Discord name - ikeyIX#2007 Link to comment Share on other sites More sharing options...
_Tarna_ Posted March 27, 2021 Share Posted March 27, 2021 the indents and its to run not just run. Also you can just do broadcast " " to broadcast a message instead of just executing a custom console command. And you can also do remove 50000 from player's balance too instead of executing a console command. And that if statement is wrong. That money variable should be a number and make it if {%player%bal} >= 50000. Also you should change the variable to {bal::%player's uuid%} instead. 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...
Ikey Posted March 27, 2021 Author Share Posted March 27, 2021 (edited) It is now saying "Cant compare 'if {%player%bal}' with an integer (bossgui.sk, line 5: if {%player%bal} <=50000')" and "Cant understand this condition/effect: if {%player%bal} =< 50000 (bossgui.sk, line 8: if {%player%bal} =< 50000')" Here is my skript so far: command /openboss: trigger: open virtual chest inventory with size 3 named "&c&lBoss" to player format gui slot 11 of player with netherite sword named "&c&lFight The Boss" with lore "&a&oThis will cost 50k" to run: if {%player%bal} >= 50000 execute console command "/say &c&l%player% Is now fighting the Boss!" execute console command "/eco take %player% 50000" if {%player%bal} =< 50000 send "&cYou need $50000 for that!" Can anyone help me? Edited March 27, 2021 by ikey Owner of ikeysurviv.minehut.gg ⊱------------------------------⊰ [LEGEND] on Minehut ⊱------------------------------⊰ In-game name - ikeyIX Discord name - ikeyIX#2007 Link to comment Share on other sites More sharing options...
_Tarna_ Posted March 27, 2021 Share Posted March 27, 2021 12 hours ago, ikey said: It is now saying "Cant compare 'if {%player%bal}' with an integer (bossgui.sk, line 5: if {%player%bal} <=50000')" and "Cant understand this condition/effect: if {%player%bal} =< 50000 (bossgui.sk, line 8: if {%player%bal} =< 50000')" Here is my skript so far: command /openboss: trigger: open virtual chest inventory with size 3 named "&c&lBoss" to player format gui slot 11 of player with netherite sword named "&c&lFight The Boss" with lore "&a&oThis will cost 50k" to run: if {%player%bal} >= 50000 execute console command "/say &c&l%player% Is now fighting the Boss!" execute console command "/eco take %player% 50000" if {%player%bal} =< 50000 send "&cYou need $50000 for that!" Can anyone help me? you forgot a : after the if statements and you need to indent correctly 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...
Ikey Posted March 27, 2021 Author Share Posted March 27, 2021 All of the indenting worked successfully but the right clicking of the sword is not working also when ever I execute the command it says in chat "An internal error occurred while attempting to preform this command." also the ${%player%bal}" is not working on line 11. Here is my skript: command /openboss: trigger: open virtual chest inventory with size 3 named "&c&lBoss" to player format gui slot 11 of player with netherite sword named "&c&lFight The Boss" with lore "&a&oThis will cost 50k" to run: if {%player%bal} >= 50000: execute console command "/say &c&l%player% Is now fighting the Boss!" execute console command "/eco take %player% 50000" if {%player%bal} is less than 50000: send "&cYou need $50000 for that!" to player format gui slot 15 of player with sunflower named "&aYou have $${%player%bal}"" format gui slot 0 of player with black stained glass pane format gui slot 1 of player with black stained glass pane format gui slot 2 of player with black stained glass pane format gui slot 3 of player with black stained glass pane format gui slot 4 of player with black stained glass pane format gui slot 5 of player with black stained glass pane format gui slot 6 of player with black stained glass pane format gui slot 7 of player with black stained glass pane format gui slot 8 of player with black stained glass pane format gui slot 18 of player with black stained glass pane format gui slot 19 of player with black stained glass pane format gui slot 20 of player with black stained glass pane format gui slot 21 of player with black stained glass pane format gui slot 22 of player with black stained glass pane format gui slot 23 of player with black stained glass pane format gui slot 24 of player with black stained glass pane format gui slot 25 of player with black stained glass pane format gui slot 26 of player with black stained glass pane Owner of ikeysurviv.minehut.gg ⊱------------------------------⊰ [LEGEND] on Minehut ⊱------------------------------⊰ In-game name - ikeyIX Discord name - ikeyIX#2007 Link to comment Share on other sites More sharing options...
Pechu317 Posted March 29, 2021 Share Posted March 29, 2021 put your code into a code block or into a pastebin or something, because i think word wrapping is messing up how we see your skript Link to comment Share on other sites More sharing options...
Ikey Posted March 29, 2021 Author Share Posted March 29, 2021 ok here is the pastebin https://pastebin.com/HEhtUUh6 Owner of ikeysurviv.minehut.gg ⊱------------------------------⊰ [LEGEND] on Minehut ⊱------------------------------⊰ In-game name - ikeyIX Discord name - ikeyIX#2007 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