Thread: Insanityx 317Pi Base

Results 1 to 7 of 7
  1. #1 Insanityx 317Pi Base 
    Registered Member

    Join Date
    Oct 2016
    Posts
    136
    Thanks given
    70
    Thanks received
    37
    Rep Power
    105
    Hey guys, back at it after years of being away, found my base, added quite a few new little things, made little things work right or better. Any tips on fixing these errors for my control panel? I do not need to be spoon fed, I've fixed all my other errors and this one is stumping me


    Code:
    src\server\util\PanelSettings.java:339: error: cannot assign a value
    riable SERVER_NAME
    Config.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
          ^
    src\server\util\PanelSettings.java:342: error: cannot assign a value
    riable ADMIN_CAN_TRADE
    Config.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected();
          ^
    src\server\util\PanelSettings.java:343: error: cannot assign a value
    riable ADMIN_DROP_ITEMS
    Config.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected();
          ^
    src\server\util\PanelSettings.java:344: error: cannot assign a value
    riable ADMIN_CAN_SELL_ITEMS
    Config.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.isSelected();


    The area the errors come from is as follows


    Code:
    if (cmd.equalsIgnoreCase("Update Settings")) {
    boolean active = Config.DOUBLE_EXP;
    Config.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
    Config.LOGOUT_MESSAGE = p.LOGOUT_BUTTON_TEXT.getText();
    Config.DEATH_MESSAGE = p.DEATH_MESSAGE_TEXT.getText();
    Config.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected();
    Config.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected();
    Config.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.isSelected();
    Config.MINI_GAMES = p.MINI_GAMES.isSelected();
    Config.LOCK_EXPERIENCE = p.LOCK_EXPERIENCE.isSelected();
    Config.DOUBLE_EXP = p.DOUBLE_EXPERIENCE.isSelected();
    
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    if (validClient(i)) {
    Client c2 = getClient(i);
    c2.getPA().sendFrame126(Config.LOGOUT_MESSAGE, 2458);
    }
    }
    return;
    }

    Thanks in advanced for any help!
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    631
    If your variables inside Config is final, remove the final modifier part and try again.
    Aka for the ones you got problem with.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Registered Member

    Join Date
    Oct 2016
    Posts
    136
    Thanks given
    70
    Thanks received
    37
    Rep Power
    105
    I got those fixed. Now its just


    src\server\util\PanelSettings.java:339: error: cannot assign a value to final va
    riable SERVER_NAME
    Config.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
    Reply With Quote  
     

  6. Thankful user:


  7. #4  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    631
    Quote Originally Posted by Jrage View Post
    I got those fixed. Now its just


    src\server\util\PanelSettings.java:339: error: cannot assign a value to final va
    riable SERVER_NAME
    Config.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
    Do it again, remove the final modifier to the variable. "cannot assign a value to final variable"


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. Thankful user:


  9. #5  
    Registered Member

    Join Date
    Oct 2016
    Posts
    136
    Thanks given
    70
    Thanks received
    37
    Rep Power
    105
    do explain, the final moddifer is the server name


    public static final String SERVER_NAME = "InsidiaX";
    Reply With Quote  
     

  10. Thankful user:


  11. #6  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    631
    Quote Originally Posted by Jrage View Post
    do explain, the final moddifer is the server name


    public static final String SERVER_NAME = "InsidiaX";
    public static final String SERVER_NAME -> public static String SERVER_NAME
    Code:
    public static String SERVER_NAME = "InsidiaX";


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  12. Thankful user:


  13. #7  
    Registered Member

    Join Date
    Oct 2016
    Posts
    136
    Thanks given
    70
    Thanks received
    37
    Rep Power
    105
    do explain, the final moddifer is the server name
    I figured it out
    lmao so simple and right in front of my eyes

    do explain, the final moddifer is the server name
    I figured it out
    lmao so simple and right in front of my eyes
    Reply With Quote  
     

  14. Thankful user:



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. Replies: 40
    Last Post: 05-13-2014, 01:51 PM
  2. zanarite -insanityx base
    By Fresh boy in forum Requests
    Replies: 0
    Last Post: 03-28-2014, 05:28 PM
  3. T1 & T2 Fix[InsanityX base]
    By Maggie in forum Buying
    Replies: 2
    Last Post: 07-20-2012, 07:43 PM
  4. need help - insanityX base
    By daniel akeel haha in forum Help
    Replies: 8
    Last Post: 05-10-2012, 07:17 PM
  5. Replies: 22
    Last Post: 03-11-2012, 03:59 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •