OK - I can reproduce the problem I referred to (in Processing 1.0.7 on Windows XP) which, as I mentioned before but crossed out, happens when you try to load a PImage before running setup:
Code:PImage a = loadImage("connected.jpg");
void setup() {
size(300, 200);
image(a,0,0);
}
...I get a NullPointerException on "image(a,0,0);". If I try:
Code:PImage a;
a = loadImage("connected.jpg");
void setup() {
size(300, 200);
image(a,0,0);
}
I get "unexpected token: void", which seems a little odd. This however works just fine:
Code:PImage a;
void setup() {
a = loadImage("connected.jpg");
size(300, 200);
image(a,0,0);
}
Looks like a bug to me...
Having said that I couldn't reproduce the problem using the OP's approach of defining the array first and then loading the images in setup.
TweakingKnobs - if you're still having the problem (and it's not related to the above) you would do well to post some code.