Results 1 to 9 of 9
  1. #1
    Westymclovin is offline Member
    Join Date
    Jun 2015
    Posts
    5
    Rep Power
    0

    Default RSPS, Symbol not found. Help me.

    That's my error, Help me please!
    Java Code:
    2 errors
    compiled Main Server Folder
    src\com\rs\game\player\content\Shop.java:127: error: cannot find symbol
                    int price = getVotePrice(item, dq);
                                ^
      symbol:   method getVotePrice(Item,int)
      location: class Shop
    src\com\rs\game\player\content\Shop.java:512: error: cannot find symbol
                    int price = getVotePrice(item,dq);
                                ^
      symbol:   method getVotePrice(Item,int)
      location: class Shop
    Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operatio
    
    Note: Recompile with -Xlint:unchecked for details.
    2 errors
    Compiled all Successfully
    Press any key to continue . . .
    Last edited by JosAH; 06-30-2015 at 09:23 AM.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: RSPS, Symbol not found. Help me.

    You need to post more of the code; compile errors don't have to be exactly on the line reported, it can also be a problem of placement without a source file, or problems that exist before the line pointed at by the compiler (such as a missing semicolon).
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Westymclovin is offline Member
    Join Date
    Jun 2015
    Posts
    5
    Rep Power
    0

    Default Re: RSPS, Symbol not found. Help me.

    int price = getVotePrice(item, dq); that is basically one of the two lines that are messing up
    They're both exactly the same

  4. #4
    Westymclovin is offline Member
    Join Date
    Jun 2015
    Posts
    5
    Rep Power
    0

    Default Re: RSPS, Symbol not found. Help me.

    int dq = slotId >= mainStock.length ? 0 : defaultQuantity[slotId];
    int price = getVotePrice(item, dq);
    int amountCoins = player.VotePoints;
    int maxQuantity = amountCoins / price;
    int buyQ = item.getAmount() > quantity ? quantity : item.getAmount()

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: RSPS, Symbol not found. Help me.

    Does your Shop class have a method "getVotePrice(Item,int)"?
    Because your compiler thinks it doesn't.

    If you think it does (and remember Java is case-sensitive), then you'll have to post the class because, as gimbal says, it may therefore mean that you have some structural problem with the code.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    Westymclovin is offline Member
    Join Date
    Jun 2015
    Posts
    5
    Rep Power
    0

    Default Re: RSPS, Symbol not found. Help me.

    getVotePrice only appears on that line of code, No where else if that helps?

  7. #7
    Westymclovin is offline Member
    Join Date
    Jun 2015
    Posts
    5
    Rep Power
    0

    Default Re: RSPS, Symbol not found. Help me.

    Also this player.getTemporaryAttributtes().put("ShopSelected Slot", clickSlot);
    int dq = slotId >= mainStock.length ? 0 : defaultQuantity[slotId];
    int price = getVotePrice(item, dq);
    player.getPackets().sendGameMessage(
    item.getDefinitions().getName()
    + ": currently costs "
    + price
    + " Vote Points.");

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: RSPS, Symbol not found. Help me.

    @OP: please wrap your code in [code] ... [/code] tags so the carets end up in their original position (showing us where the error is exactly); I did it for your first post.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: RSPS, Symbol not found. Help me.

    Quote Originally Posted by Westymclovin View Post
    getVotePrice only appears on that line of code, No where else if that helps?
    Well, that's your error.
    You can't call a method that doesn't exist.
    If you do, then this is the compilation error you get.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Error symbol not found Please help
    By laurenceshan in forum New To Java
    Replies: 2
    Last Post: 09-25-2012, 04:27 AM
  2. Symbol not found - object invisible outside of class
    By stesteve in forum New To Java
    Replies: 5
    Last Post: 02-15-2012, 09:57 PM
  3. Method Graphics.drawString() - Symbol not found
    By km0r3 in forum AWT / Swing
    Replies: 1
    Last Post: 08-27-2010, 02:55 PM
  4. Compile: symbol not found
    By zuan in forum New To Java
    Replies: 7
    Last Post: 06-24-2008, 05:17 AM
  5. symbol not found error
    By rmartyce in forum New To Java
    Replies: 1
    Last Post: 05-23-2008, 05:58 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
  •