BOXEY Posted May 7, 2020 Share Posted May 7, 2020 So my /sell skript does not work it does not give them the money or say the money them got Please Help on load: clear {sell::*} clear {price::*} set {sell::coal} to coal named "&7Coal &8(&eRight click&8)" set {price::coal} to 5 options: prefix: &6Money &7>> sellout: &6Sell &7>> command /sellop: trigger: loop {sell::*}: set {_items} to loop-value set {_amount} to number of {_items} in player's inventory if {_amount} is more than or equal to 0: remove {_amount} of {_items} from player's inventory set {_block} to "%loop-value%" set {_g} to (({_amount} * {price::%{_block}%}) * ({%uuid of player%::booster} + 1)) add {_amount} to {Totali} add {_g} to {_TotalAmount} if {_TotalAmount} is more than 0: send "{@prefix} You Sold All Your Items For %{_TotalAmount}%" add {_TotalAmount} to {bal::%player%} else: send "{@sellout} No Items To Sell" Link to comment Share on other sites More sharing options...
ReportCards Posted May 7, 2020 Share Posted May 7, 2020 Have you tried putting in debug messages? Where does it stop at? What is the reason of the issues? Zora » Discord: @reportcards Link to comment Share on other sites More sharing options...
BOXEY Posted May 8, 2020 Author Share Posted May 8, 2020 6 hours ago, ReportCards said: Have you tried putting in debug messages? Where does it stop at? What is the reason of the issues? there is no error it does not give the player the money they got but it takes the items they are selling Link to comment Share on other sites More sharing options...
ReportCards Posted May 8, 2020 Share Posted May 8, 2020 55 minutes ago, Boxmonkey said: there is no error it does not give the player the money they got but it takes the items they are selling I see the reason now, try replacing set {_block} to "%loop-value%" with set {_block} to "%loop-index%" Because using loop-value will return something like "coal named 'name here'" and not just "coal", but since the loop index is just "coal" it should work just fine 1 Zora » Discord: @reportcards Link to comment Share on other sites More sharing options...
BOXEY Posted May 9, 2020 Author Share Posted May 9, 2020 22 hours ago, ReportCards said: set {_block} to "%loop-index%" Thanks 1 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