[Solved ]Unable to use Global Variables in 2021.3

Started by Josephemer on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 21:06, 14. Apr 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved ]Unable to use Global Variables in 2021.3
Wed, 11/17/2021 - 22:59 (edited)

I'm very new to MCreator - just started using it today in fact, so there's a possibility this is my fault and not actually something wrong with the program, in which case please correct me.

Image showing a global player persistent logic variable named "masterSpawned"

I have this global variable created, however when I create a procedure and attempt to call on it, all the Custom Variable blocks are empty and list nothing to actually put in them.

An image of the list of Custom Variable blocks, none of which contain the Global Variable "masterSpawned"

Local variables work just fine, it's just the global variables I can't seem to get working.

Edited by Josephemer on Wed, 11/17/2021 - 22:59
Last seen on 20:59, 7. Oct 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pretty sure you have to…
Sat, 11/06/2021 - 06:22

Pretty sure you have to place the blocks down to see it, if it doesn't work it's probably just a bug. It is a snapshot afterall. Even if it does work you should probably just make your mod in 2021.2 until the full release for 2021.3 comes out.

Last seen on 21:06, 14. Apr 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The variables should be…
Sat, 11/06/2021 - 17:59

The variables should be visible in the list prior to placing the blocks, and I like testing the snapshot versions as much as I can. However I have now discovered that after shutting the program down when the global variable was not showing up, upon opening it up the next day, the variables DO show up in the list. So... It was literally a case of turning it off and back on again.

It depends when you created…
Mon, 11/15/2021 - 06:58

It depends when you created it as well - if you had your procedure opened, and created global variable after it, usually global variable don't show up (you need to close procedure and open it again to "update" it). But again, this is the only time I know when that happens. Glad that you found the solution.