Search:

Type: Posts; User: BouncySean

Search: Search took 1.48 seconds.

  1. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Thank you so much everything works perfectly now :D
  2. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Okay well I tried to solve that my actually placing the load method in the runModel but have still had no joy. Do you have any suggestions please?

    --- Update ---

    I now altered it by actually...
  3. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    I'm going to check now, and will type in the code where pirateWordsList is defined/used.[COLOR="Silver"]

    --- Update ---

    I first of all defined pirateWordList as an instance variable:

    ...
  4. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Okay I will check now.

    --- Update ---

    The error definatly appears to happen when I add the words to the array.
    I have added some test code as shown below, and I have put the output below that:...
  5. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Null for both variables.

    --- Update ---


    I've tested the load and it defiantly is picking up the txt files name correctly.
  6. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Sorry I altered the code and that messed up the lines.
    The error is happening at this line: pirateWordsList.add(secretPirateWord);
    I sucesfully printed out the secrretPirateWord however when I...
  7. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    The only thing with a value on line 108 with a value of 0 is i, as line 108 is the for (int i=0;i<num;i++){ line. I have checked num prints out 7 and i prints out 0, also the array list is empty as...
  8. Replies
    18
    Views
    164

    [SOLVED] Re: Can't read into Array List.

    Hi thanks a lot guys, I've edited the post now.
    I did try looking at where the null pointer was thrown but I can't figure the problem out.
  9. Replies
    18
    Views
    164

    [SOLVED] Can't read into Array List.

    Hi, First time poster here so sorry if I've done something wrong in relation to posting. I am creating a hangman game and I want to read in a list of words from a text file, but after the user inputs...
Results 1 to 9 of 9