469,353 Members | 2,259 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,353 developers. It's quick & easy.

Cannot Find Symbol method

please help been working on a project got it down to 5 errors from 100 now i have no idea what to do.
Expand|Select|Wrap|Line Numbers
  1.  Errors:
  2. init:
  3. deps-jar:
  4. Created dir: C:\Users\Tommy\Desktop\build\classes
  5. Compiling 306 source files to C:\Users\Tommy\Desktop\build\classes
  6. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\provider\xmlwz\FileStoredPngMapleCanvas.java:14: warning: com.sun.imageio.plugins.png.PNGImageReaderSpi is Sun proprietary API and may be removed in a future release
  7. import com.sun.imageio.plugins.png.PNGImageReaderSpi;
  8. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:429: cannot find symbol
  9. symbol  : method getName()
  10. location: class java.lang.Object
  11.                                ps.setString(1, GetPet().getName());        // Set name
  12.                                                        ^
  13. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:430: cannot find symbol
  14. symbol  : method getLevel()
  15. location: class java.lang.Object
  16.                                ps.setInt(2, GetPet().getLevel());      // Set Level
  17.                                                     ^
  18. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:431: cannot find symbol
  19. symbol  : method getCloseness()
  20. location: class java.lang.Object
  21.                                ps.setInt(3, GetPet().getCloseness());        // Set Closeness
  22.                                                     ^
  23. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:432: cannot find symbol
  24. symbol  : method getFullness()
  25. location: class java.lang.Object
  26.                                ps.setInt(4, GetPet().getFullness());        // Set Fullness
  27.                                                     ^
  28. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:433: cannot find symbol
  29. symbol  : method getUniqueId()
  30. location: class java.lang.Object
  31.                                ps.setInt(5, GetPet().getUniqueId());   // Set ID        
  32.                                                     ^
  33. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\provider\xmlwz\FileStoredPngMapleCanvas.java:47: warning: com.sun.imageio.plugins.png.PNGImageReaderSpi is Sun proprietary API and may be removed in a future release
  34.                        ImageReaderSpi readerSpi = iioRegistry.getServiceProviderByClass(PNGImageReaderSpi.class);
  35.                                                                                         ^
  36. 5 errors
  37. 2 warnings
  38. BUILD FAILED (total time: 2 seconds)
Actual file is attached. [Edited by Admin]
Attached Files
File Type: txt code.txt (205.6 KB, 873 views)
Jul 28 '08 #1
10 12626
RamananKalirajan
607 512MB
[HTML]ps.setString(1, getPet().getName()); // Set name
ps.setInt(2, getPet().getLevel()); // Set Level
ps.setInt(3, getPet().getCloseness()); // Set Closeness
ps.setInt(4, getPet().getFullness()); // Set Fullness
ps.setInt(5, getPet().getUniqueId()); // Set ID [/HTML]

Hi dude, actually your code is showing error in these lines only. Whether can we use method calling like this. getPet() is a bean method in a class. Using that how can you call getLevel() method. Try to create a object and access those methods using object. Better you just post me with the Bean Class which contains getName(), getLevel() methods

Regards
Ramanan Kalirajan
Jul 28 '08 #2
gits
5,390 Expert Mod 4TB
moved to java-forum ... javaScript != java :)

kind regards
Jul 28 '08 #3
r035198x
13,262 8TB
According to the compiler, your GetPet method returns an object of type Object and the Object class doesn't have any of those methods you are trying to call.
Notice also the warnings you are getting.

P.S Use code tags when posting code and post only the relevant parts of the code.
Jul 28 '08 #4
JosAH
11,448 Expert 8TB
According to the compiler, your GetPet method returns an object of type Object
Strange; because according to line 2145 it returns a MaplePet (whatever that
might be).

kind regards,

Jos
Jul 28 '08 #5
r035198x
13,262 8TB
Strange; because according to line 2145 it returns a MaplePet (whatever that
might be).

kind regards,

Jos
He seems to have two methods GetPet() (the one he's calling) and getPet() (the one he's probably supposed to be calling).
Jul 28 '08 #6
JosAH
11,448 Expert 8TB
He seems to have two methods GetPet() (the one he's calling) and getPet() (the one he's probably supposed to be calling).
Ah ok, you must've dug deeper in those thousands lines of code than I did ;-)

kind regards,

Jos
Jul 28 '08 #7
RamananKalirajan
607 512MB
Whether you got the project working cool or still some errors over there.

Regards
Ramanan Kalirajan
Jul 28 '08 #8
hey guys thanks alot and sorry for posting the whole thing i got it =) thank you guys alot.
Jul 29 '08 #9
MMcCarthy
14,534 Expert Mod 8TB
I've edited the original post to remove the code which I've placed in a text file and attached it.

Mary
Jul 29 '08 #10
r035198x
13,262 8TB
I've edited the original post to remove the code which I've placed in a text file and attached it.

Mary
Neat. Thanks.
Jul 29 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

15 posts views Thread by Bjorn Jensen | last post: by
1 post views Thread by vsp15584 | last post: by
1 post views Thread by Shiva48 | last post: by
1 post views Thread by jank | last post: by
2 posts views Thread by jazzyme2 | last post: by
2 posts views Thread by karinmorena | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.