Global variables in Commands - Please help

1 post / 0 new
Last seen: 1 year 3 weeks ago
Joined: 03/09/2015 - 17:53
Gems: 0
Global variables in Commands - Please help

Hello! Could anyone please help me with this?

I'm fairly new to MCreator so i am actually just playing around with it to see what i can manage to do! But here is my problem:

I am trying to make a command, and i want the "answer" to have a Global Variable in it(Already defined).

Here is what i type as answer: "You have <warCoins> WarCoins!" ive also tried "You have <VAR:warCoins> WarCoins!" but when it compiles it crashes:

Spoiler: Highlight to view
C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\ error: cannot find symbol
    var1.addChatMessage(new ChatComponentText("You have "+warCoins+" WarCoins!"));
  symbol:   variable warCoins
  location: class mcreator_warCoins.CommandwarCoins
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Thanks for any help! 

Edited by: emwa on 06/14/2015 - 18:45