Results 1 to 4 of 4
  1. #1
    Stevemagegod is offline Member
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Default cannot be resolved or is not a field

    Hello i am trying to convert a Script, and i am getting the error cannot be resolved or is not a field. How do i generally fix these types of errors in java?

    Java Code:
     private final int[][] Cf = { a.Ve, a.hc, a.TF, a.Hb, a.wE, a.vd, a.ED, a.TA };
    Eclipse is underlining Ve, hc, TF, Hb, we, vd, ed, and ta.

    Multiple markers at this line
    - hc cannot be resolved or is not a
    field
    - wE cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined
    - Cannot reference a field before it is
    defined
    - Cannot reference a field before it is
    defined
    - ED cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined
    - TA cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined
    - Ve cannot be resolved or is not a
    field
    - TF cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined
    - Hb cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined
    - vd cannot be resolved or is not a
    field
    - Cannot reference a field before it is
    defined

    The option it gives me for a fix is Rename in File. I tried just deleting the line of code but then it gives me more errors throughout the script

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: cannot be resolved or is not a field

    You should provide more information than that. What is 'a'? Do you wish to define a 2d array (the right side of the definition must be a 2D array)?

    Recommendation: you should use more meaningful variable names as opposed to obfuscated letters of the alphabet.

  3. #3
    Stevemagegod is offline Member
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Default Re: cannot be resolved or is not a field

    here is the code on pastebin if you want more information to look over it

    [Java] iDungeon Pro Rarebot - Pastebin.com

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: cannot be resolved or is not a field

    Is that de-compiled code? It is huge and difficult to understand. If it were me, I'd contact the code authors for clarification and better code perhaps.

Similar Threads

  1. Replies: 0
    Last Post: 07-22-2011, 12:47 PM
  2. HttpServletRequest cannot be resolved-- Help me
    By hphuoc in forum Java Servlet
    Replies: 1
    Last Post: 04-26-2011, 09:23 AM
  3. front end display of field description when clicking the field name
    By neils in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 10-29-2010, 11:47 AM
  4. Replies: 1
    Last Post: 10-25-2010, 12:20 PM
  5. Replies: 4
    Last Post: 01-17-2010, 11:13 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
  •