Thread: Int error help fast! [PI]

Results 1 to 4 of 4
  1. #1 Int error help fast! [PI] 
    Registered Member
    Join Date
    Apr 2013
    Posts
    53
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    src\server\model\players\SkillMenu.java:15: error: possible loss of precision
    private static final int[][] items = {{15701,15702.15703,15704,1321,1323
    ,1325,1327,1329,1331,1333,4153,4587,4151,4718,1169 4,9747},
    ^
    required: int
    found: double
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Compile Finished!

    This error comes. cant just understand what is that problem.
    Reply With Quote  
     

  2. #2  
    Registered Member
    danimals br0's Avatar
    Join Date
    Aug 2010
    Posts
    885
    Thanks given
    64
    Thanks received
    94
    Rep Power
    109
    Quote Originally Posted by santeri View Post
    src\server\model\players\SkillMenu.java:15: error: possible loss of precision
    private static final int[][] items = {{15701,15702.15703,15704,1321,1323
    ,1325,1327,1329,1331,1333,4153,4587,4151,4718,1169 4,9747},
    ^
    required: int
    found: double
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Compile Finished!

    This error comes. cant just understand what is that problem.
    15702.15703
    1169 4
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2011
    Posts
    454
    Thanks given
    17
    Thanks received
    37
    Rep Power
    61
    private static final int[][] items = {{15701,15702.15703,15704,1321,1323
    ,1325,1327,1329,1331,1333,4153,4587,4151,4718,1169 4,9747}

    You declared items as a int, but it found it as a double variable. A int cannot have decimals in it. I'm assuming it's because of the "15702.15703" or something. If not then just change it to private static final double.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2013
    Posts
    53
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Gershon View Post
    private static final int[][] items = {{15701,15702.15703,15704,1321,1323
    ,1325,1327,1329,1331,1333,4153,4587,4151,4718,1169 4,9747}

    You declared items as a int, but it found it as a double variable. A int cannot have decimals in it. I'm assuming it's because of the "15702.15703" or something. If not then just change it to private static final double.
    Thanks helped!!
    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. [pi] need help fast / cmd error
    By iSacred in forum Help
    Replies: 9
    Last Post: 06-23-2011, 07:06 PM
  2. [Pi]Error fast help needed! [Pi]
    By Niv3k in forum Help
    Replies: 2
    Last Post: 04-07-2011, 07:17 PM
  3. [Pi] Error Need Fast Help [Pi]
    By Niv3k in forum Help
    Replies: 5
    Last Post: 04-06-2011, 12:51 PM
  4. 2 errors help fast plz
    By TEHproLEECHR in forum Help
    Replies: 2
    Last Post: 09-26-2009, 07:20 PM
  5. help!!!!!! fast running error
    By mike623030 in forum Help
    Replies: 11
    Last Post: 08-22-2009, 08:04 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
  •