Search:

Type: Posts; User: Norm

Search: Search took 0.21 seconds.

  1. Re: Exception in thread "main" java.lang.NullPointerException - And everything else...

    Is currentEnemy null at line 264?
    Where is the variable: currentEnemy assigned a value? Is it assigned a value before the code tries to use it?
    Add a println to the code that prints out a message...
  2. Re: Exception in thread "main" java.lang.NullPointerException - And everything else...

    Yes, I am suggesting that you add a println in the actual code. Its a way to debug code and see how it is executing.
  3. Re: Exception in thread "main" java.lang.NullPointerException - And everything else...

    If currentPokemon has a null value, where does the code assign it a value?
    Is it assigned a value BEFORE it is used? Add a println that prints a message where it is assigned a value that will...
  4. Re: Exception in thread "main" java.lang.NullPointerException - And everything else...

    What variable at line 337 has the null value? Why is it null?


    The compiler would give an error message if the variable were not defined.
  5. Re: Exception in thread "main" java.lang.NullPointerException - And everything else...

    Please post the full text of the error messages. The message gives the location of the error where the statement with the null value was executed.
    Look at the statement where the error happened,...
Results 1 to 5 of 5