Started by
BittleLit
on
Topic category: Troubleshooting, bugs, and solutions
So there's a ready piece of text for text elements:
<TextFieldName:Text>
And it always causes compilation errors for both the GUI and Overlay elements:
2021-12-28T12:00:27.266+0300 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
2021-12-28T12:00:28.769+0300 [ERROR] [system.err] C:\Users\SaN79\MCreatorWorkspaces\health_requirement_mod\src\main\java\net\mcreator\healthrequirementmod\client\gui\TestOverlay.java:39: error: cannot find symbol 2021-12-28T12:00:28.769+0300 [ERROR] [system.err] Minecraft.getInstance().font.draw(event.getMatrixStack(), "Text is " + TextFieldName.getValue() + "", posX + -72, posY + 86,
2021-12-28T12:00:28.770+0300 [ERROR] [system.err] ^
2021-12-28T12:00:28.770+0300 [ERROR] [system.err] symbol: variable TextFieldName
2021-12-28T12:00:28.770+0300 [ERROR] [system.err] location: class TestOverlay
2021-12-28T12:00:29.264+0300 [ERROR] [system.err] 1 error
What exactly happened here and how do I fix it?
You need to replace this with your actual text field name you placed in the GUI, it is only a placeholder
how exactly? <TextFieldName:[My name]>?
or <[MyName]:Text>?
PLEASE HELP HOW DO I DO IT
NVM FIGURED IT OUT
Just type like such:
So just dont use the colon. Gonna test if this works rn.
Nope, it writes something like "net.v something.mcreator" and something and then goes off the screen.
god how do i do it??????????????????????????????????????????????????????????
YESSS I MADE IT WORK!
Just make it like this:
Note: TN is the name of your textfield. It MUST exist first or errors will pop up until you make one with that name as its machine name.
Note: for whatever reason text MUST be after the textfield name.
But, most importantly, it works.