Local variable adding one twice on one right click

Started by SwordLasher on Mon, 06/05/2017 - 01:08

Topic category: Bugs and solutions

Last seen on 13:21, 17. Jun 2017
Joined Jun 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Local variable adding one twice on one right click
Mon, 06/05/2017 - 01:08

I created an item, whereupon right click on air, consumes the item and adds +1 to a variable titled 'manaVar'. Whenever I right click, even in survival mode, the variable adds one twice. I can't find a way to work around it. If any of you have a solution, I'd be grateful!

Last seen on 13:21, 17. Jun 2017
Joined Jun 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
And also, the variable stays
Mon, 06/05/2017 - 01:40

And also, the variable stays constant throughout all the worlds the player makes. Is there a way to reset it to zero when creating a new world and also making sure the variable stays constant in the first world he created?