Jump to content

Why doesn't it add 1 to the mined counter?


Recommended Posts

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

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?

tumblr_lqahoaPLkC1ql1l0v.gif

Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something

tumblr_lqahoaPLkC1ql1l0v.gif

>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

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

tumblr_lqahoaPLkC1ql1l0v.gif

Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something

tumblr_lqahoaPLkC1ql1l0v.gif

>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...