Thank you so much everything works perfectly now :D
Type: Posts; User: BouncySean
Thank you so much everything works perfectly now :D
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...
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:
...
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:...
Null for both variables.
--- Update ---
I've tested the load and it defiantly is picking up the txt files name correctly.
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...
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...
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.
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...