mansionInfo[] mansion=new mansionInfo[3];
......
if(rackItem.size()>0)
{
System.out.println(rackItem.get(0).GetResName()+" "+i);
mansion[i].cellar[0]=toDo(rackItem.get(0).GetResName(),"cellar");//// error here
}
......
int toDo(String name,String envoirment){return 1;}
....
private class mansionInfo{
int[] inside={-1,-1};
int[] cellar= {-1,-1};
String[] iName={"N/A","N/A"};
String[] cName={"N/A","N/A"};
}
gfx/invobjs/cheese-tray-cheese 0 -- to jest resName, 0 to "i"
Exception in thread "Thread-12" java.lang.NullPointerException
at fun.cheeseScript.cheeseDownstairs(cheeseScript.java:635)
kod chociaż poj..... messy, wygląda na sprawny.
nie jestem pewnien tego:
mansion[i].cellar[0]