Hello,
I am trying to setup a console using Nifty. It seems pretty easy but I have a major problem. Say I have a command as follows:
[java]
ConsoleCommand setH = new setH();
cc.registerCommand(“set h #”, setH);
[/java]
And then I have the following class:
[java]
private class setH implements ConsoleCommand {
@Override
public void execute(final String[] args) {
H = Float.parseFloat(args[2]);
console.output(“Variable '”+args[1]+"’ set to "+args[2]);
}
}
[/java]
so when I type “set h <some number>” the appropriate action takes place
But if I also have a class that is entitled “setO” and have a command that is like the set h command but with an o, the setH command is still activated. It is as if the first word in the command is all that matters.
Is this a known problem or am I doing something wrong?