Hello. I'm trying to implement a ::updates command, That will bring up an interface with the recent updates that has been established. However, i'm getting something i don't think i've seen before. Here is my command:
Code:
if (cmd.toLowerCase().startsWith("updates")) {
c.getPA().setInterfaceText("Recent Updates", 18814);
int id = 18822;
c.getPA().setInterfaceText("Increased Combat exp slightly.", id++);
c.getPA().setInterfaceText("Anti anti-bot into Thieving.", id++);
c.getPA().setInterfaceText("Added Dragon/Ruby bolts (e) into shops.", id++);
c.getPA().setInterfaceText("Simplified Barrows minigame.", id++);
c.getPA().setInterfaceText("Revised Zombie minigame rewards.", id++);
c.getPA().setInterfaceText("Fixed a few item slot mismatches.", id++);
c.getPA().setInterfaceText(":Added Money pouch in bank.", id++);
for (int i = id; i < 18922; i++) c.getPA().setInterfaceText("", i);
c.getPA().showInterface(18810);
When i implement that in Commands.java, I get multiple errors as in:
Duplicate local variable with this line:
That's for a rules interface.
&&
That's for a commands interface.
Same code as above for a Lottery interface.
All are throwing out the same error with that duplicate local variable. But when i "Null" out of updates command. It works perfectly without errors. Is there something i'm missing in that command? Cause it looks to be just fine.
Thanks for the help.