Button Trouble (Code not compiling properly)

Started by Ultanium on

Topic category: Troubleshooting, bugs, and solutions

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Button Trouble (Code not compiling properly)

So, I want to make an image button do a procedure that changes a variable and gives an advancement.

Whenever I have the procedure for this in the button code and try to test it, I get the error: Your workspace contains mod elements that don't compile properly.

This error only shows up when the procedure is inside of the GUI's button, I have no idea what the problem is and am asking for help since this is an important part of the mod I am making.

 

Block code for button is as follows (to my knowledge):

If player has advancement = false and player's skill points > or = to 1:

  Close any GUI open   

  Add advancement: DoubleJumpUnlocked

  Set logic "DoubleJumpUnlocked" to true

  Set number of skill points to "skill points - 1"

Else

  If skillpoints is < 1

    Close any GUI open

    print "You need 1 skill point to unlock this ability."