Global variables in Commands - Please help

Started by emwa on Sun, 06/14/2015 - 16:42

Topic category: Help with MCreator modding

Last seen on 18:35, 25. Sep 2016
Joined Mar 2015
User points:


  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Global variables in Commands - Please help
Sun, 06/14/2015 - 16:45 (edited)

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:

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 Sun, 06/14/2015 - 16:45