Hi,
I am currently trying to iterate through Item.itemsList
e.g
Item[] allItems = Item.itemsList;;
for (int i = 0; i < allItems.length; i++)
{
allItems[i].getStatName();
// to display in GUI
// to display in config file
}
But overtime I do i get a java.lang.NullPointerException
I know that allItems.getStatName(); is causing the issue since if I were to write to a config file, say, the value of 'i', within the loop, it works.
Is there any way to fix this or are there any other alternatives (I am C# developer so not everything in Java is apparent to me)
Thanks in advance.