Skip to content

Unable to set Global Variables from configuration file #67

@smmmadden

Description

@smmmadden

Issue description

I'm trying to create a procedure that will check the configuration file and read the properties, get their values and then set global variable values to them. The global variables would then be used with Cloth-Config Plugin that I can provide an in-game option to change configuration settings, but I need to get the latest values first to ensure the player sees the right settings.
What's happening is, if I use the Read JSON file and get values, I get a stack overflow and the Set Global elements return null. I also tried using the for each line of the file get the text and do...element and still the global variables are not getting set.
To prove that the global variables are not getting set (or reading the properties to do so), I added a logger to print out the value. The game errors on load with a null value.
image
image

How to reproduce this issue?

Created a config.json file
Added Global Variables to support Cloth-Config
image
Attempted to read the properties and set global variables in a procedure
Ran Client option
Fails

Operating system

Windows

Details

FileManager 5.10
MCreator 2024.1.17319
neoforge-1.20.4

Example workspace

No response

Logs

https://pastebin.com/4diu03L0

Issue tracker rule checks (please read carefully)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions