Results 1 to 14 of 14
  1. #1
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default Some problem with game

    I make a game, this game is made by netbeans(GameBuilder).
    When i install it to nokia N70 : everything is ok
    but when i install it to nokia 7610 : it has a problem; When i start new game, this is the problem : nullpointerexception
    Please tell me why and help me
    thanks

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default

    0 java.lang.NullPointerException : when i click to new game, it appears this error. How can i fix it

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    That's not the complete error message, or the trace. There are more details like the line number and class name where this error occurs initially.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Basically your error message pointed that the somewhere in your code that value set to null, may be in an array or such collection, which cause to terminate your program.

  6. #6
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default

    i give my code to you, and can you please fix it for me, if you agree, i will give it

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    I'm not sure that all the configuration relevant for gaming has setup in my PC. That's why I ask you the complete error message, rather the code. If your code is a small one then post it here, otherwise post the complete error message. Why you cannot post the complete error message, can't you see it completely?

  8. #8
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default

    when i install in nokia 7610 and play new game : it only show that message on the screen not anything else. i' m learning make game with java, this is my homework. I will give it to you, i hope when you see my code, you will know how to fix it, thanks

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Only I can do is go though the code and try to find the issue, not able to run. Post the code to see.

  10. #10
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default

    Sorry my code is so many, i can't post it in forums
    this is my code : DoAn_Maze.rar
    you download and see it. Don't need run. Please
    Last edited by kirayamato; 11-28-2010 at 06:58 AM.

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Sorry kirayamato, I cannot compile your code. Some of the packages are missing. If you could post the error message.

  12. #12
    kirayamato is offline Member
    Join Date
    Nov 2010
    Posts
    8
    Rep Power
    0

    Default

    i'm so sorry, but when i install it to my nokia 7610 and play, i only show this error "0 java.lang.NullPointerException", not anything else

  13. #13
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,751
    Rep Power
    19

    Default

    Then somewhere (possibly) inside your code you are catching an exception and, insetad of doing ex.printStackTrace(), you are doing ex.printMessage() (or something along those lines).

    Fix that first then you might get a more menaingful error message.

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. My java game problem!? Help!!!
    By Jcbconway in forum AWT / Swing
    Replies: 32
    Last Post: 09-26-2010, 09:33 PM
  2. Huge problem. PacMan game.
    By Bullfrog in forum New To Java
    Replies: 3
    Last Post: 06-01-2010, 02:39 PM
  3. Need smart solution on java game lag problem..
    By Addez in forum New To Java
    Replies: 0
    Last Post: 11-13-2009, 12:48 PM
  4. SUDOKU game problem
    By bumblyb33 in forum AWT / Swing
    Replies: 2
    Last Post: 05-05-2009, 11:18 PM
  5. Problem with an assignment: Backgammon game
    By Poddy in forum New To Java
    Replies: 6
    Last Post: 02-05-2009, 05:32 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
  •