Thread: Clicking buttons

Results 1 to 6 of 6
  1. #1 Clicking buttons 
    Registered Member
    Join Date
    Nov 2009
    Posts
    519
    Thanks given
    135
    Thanks received
    10
    Rep Power
    32
    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..


    case 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;
    and i get this error all the time



    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 . . .
    Reply With Quote  
     

  2. #2  
    Donator

    Frosty Teh Snowman's Avatar
    Join Date
    Sep 2007
    Posts
    1,084
    Thanks given
    86
    Thanks received
    256
    Rep Power
    103
    c.curseActive[#]

    # = the placement in the boolean array you have set up.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2009
    Posts
    519
    Thanks given
    135
    Thanks received
    10
    Rep Power
    32
    what do u mean placement of boolean ?? how do i find it?
    Reply With Quote  
     

  4. #4  
    Owner of Spiritual-RSPS™

    Join Date
    Jul 2011
    Age
    28
    Posts
    101
    Thanks given
    6
    Thanks received
    11
    Rep Power
    0
    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;
    Reply With Quote  
     

  5. #5  
    Registered Member
    Bubletan's Avatar
    Join Date
    May 2011
    Posts
    585
    Thanks given
    133
    Thanks received
    283
    Rep Power
    320
    Setting curseActive to true if it is true...? And false if its false..
    Reply With Quote  
     

  6. #6  
    Donator

    Frosty Teh Snowman's Avatar
    Join Date
    Sep 2007
    Posts
    1,084
    Thanks given
    86
    Thanks received
    256
    Rep Power
    103
    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.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. clicking buttons error
    By brokenangel in forum Help
    Replies: 2
    Last Post: 08-15-2012, 05:05 AM
  2. Clicking buttons in New interfaces.
    By Human in forum Help
    Replies: 3
    Last Post: 12-29-2011, 07:19 AM
  3. [PI] Clicking buttons help!
    By Acquittal in forum Help
    Replies: 7
    Last Post: 07-09-2011, 11:45 AM
  4. PI - Clicking Buttons, Cases
    By Infexis in forum Help
    Replies: 2
    Last Post: 11-21-2010, 03:32 AM
  5. [PI] Clicking Buttons
    By .php in forum Help
    Replies: 3
    Last Post: 10-09-2010, 12:39 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •