c.curseActive[#]
# = the placement in the boolean array you have set up.
|
okai well here is my code for when i click it, its supose to switch prayers from curses to normal or normal to curses.. here is my code..
and i get this error all the timecase 93121://Swap Prayers
if(!c.inWild()){
if(c.curseActive) {
c.curseActive = true;
c.setSidebarInterface(5, 22500);
c.startAnimation(645);
c.sendMessage("You sense a surge of power flow through your body!");
c.getCombat().resetPrayers();
} else {
c.curseActive = false;
c.setSidebarInterface(5, 5608);
c.startAnimation(645);
c.sendMessage("You sense a surge of purity flow through your body!");
c.getCombat().resetPrayers();
}
} else {
c.sendMessage("You cannot use this in the wild.");
}
break;
src\server\model\players\packets\clicking\Clicking Buttons.java:182: incompatible
types
found : boolean[]
required: boolean
if(c.curseActive) {
^
src\server\model\players\packets\clicking\Clicking Buttons.java:183: incompatible
types
found : boolean
required: boolean[]
c.curseActive = true;
^
src\server\model\players\packets\clicking\Clicking Buttons.java:189: incompatible
types
found : boolean
required: boolean[]
c.curseActive = false;
^
3 errors
[8/31/12 3:15 PM]: compiled 113 classes in 5642ms
[8/31/12 3:15 PM]: compilation complete.
Press any key to continue . . .
c.curseActive[#]
# = the placement in the boolean array you have set up.
what do u mean placement of boolean ?? how do i find it?
case 93121://Swap Prayers
if(!c.inWild()){
c.sendMessage("You cannot use this in the wild.");
}
else if(c.curseActive) {
c.curseActive = true;
c.setSidebarInterface(5, 22500);
c.startAnimation(645);
c.sendMessage("You sense a surge of power flow through your body!");
c.getCombat().resetPrayers();
} else {
c.curseActive = false;
c.setSidebarInterface(5, 5608);
c.startAnimation(645);
c.sendMessage("You sense a surge of purity flow through your body!");
c.getCombat().resetPrayers();
}
break;
Setting curseActive to true if it is true...? And false if its false..
Your curseActive boolean is an array. It's done that way so you can set different curses to active. The way you're using it, you're trying to use it as a regular boolean when you need to add the array value in it for it to work.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |