When i set a variable all other variables reset

Started by ARandomEnderman on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Jun 2023
Points:
203

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
When i set a variable all other variables reset

i have a very simple procedure that checks for some variables and some other stuff, but when i set groundpounded to -1 (or anything else) all other variables (Dashes, ticks) reset to default

 

https://imgur.com/a/ZU4Aov4

Active 1 day ago
Joined May 2022
Points:
1254

User statistics:

  • Modifications: 14
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1142
Yeah, that definitely…
Mon, 04/08/2024 - 11:47

Yeah, that definitely shouldn't be an issue, your code looks fine. Try regenerating the code and clearing the gradle caches- it might also be worth testing this in a separate workspace to see if the problem persists.

Active 1 year ago
Joined Jun 2023
Points:
203

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
how would i regenerate the…
Mon, 04/08/2024 - 17:48

how would i regenerate the code and/or clear gradle cache?

Active 1 day ago
Joined May 2022
Points:
1254

User statistics:

  • Modifications: 14
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1142
To regenerate the code,…
Mon, 04/08/2024 - 18:45

To regenerate the code, press the orange button in the top right hand corner. (The mouseover text tells you which one.) Reloading the gradle caches is a more extreme measure that takes quite a bit longer, but fixes errors that have to do with stuff getting corrupted. To do that, you need to go into the 'build' tab at the top of the screen, and select 'build and run.' It's a good first thing to try if you're getting a weird error.

Active 1 year ago
Joined Jun 2023
Points:
203

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
I did both, and it fixed 1…
Mon, 04/15/2024 - 12:40

I did both, and it fixed 1 of the procedures, the 2 other ones still do it