WilliamWert Posted July 16, 2021 Share Posted July 16, 2021 Hello, I have made this skript where when you mine a block, it adds one to a counter of how many blocks you've mined. It says that there arent any errors but when you break stone it gives you the item but doesnt add to the counter. How do I fix this? on break of stone: event-block is stone: cancel event set block to air add 1 to {mined::%player%} give player 1 stone named "&fStone" with lore "&f&lBASIC" Link to comment Share on other sites More sharing options...
StarBunnie Posted July 16, 2021 Share Posted July 16, 2021 5 hours ago, WilliamWert said: Hello, I have made this skript where when you mine a block, it adds one to a counter of how many blocks you've mined. It says that there arent any errors but when you break stone it gives you the item but doesnt add to the counter. How do I fix this? on break of stone: event-block is stone: cancel event set block to air add 1 to {mined::%player%} give player 1 stone named "&fStone" with lore "&f&lBASIC" Would you mind showing us the skript where you read the variable to check if it has increased? Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< Link to comment Share on other sites More sharing options...
TheProB Posted July 16, 2021 Share Posted July 16, 2021 if it says <none>, you have to set the value first example of this is like if {mined::%player%} is not set: set {mined::%player%} to 0 im pretty sure Link to comment Share on other sites More sharing options...
StarBunnie Posted July 16, 2021 Share Posted July 16, 2021 39 minutes ago, TheProB said: if it says <none>, you have to set the value first example of this is like if {mined::%player%} is not set: set {mined::%player%} to 0 im pretty sure when adding something this isn't really necessary and if you want to use it in a message while it's not that you can use "?" send "&7Blocks mined: &e%{mined::%player's uuid%} ? 0%" That is good because the var doesn't need to be set right away so new player's that only join for a second don't add to many variables and clutter up your server Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< 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