Hello guys,
I am having issues making this game which has a lot of small images that I would like to load to the Touchshield Slide but g++ compiler (Antipasto) is not accepting the syntax to create an PImage array. (The Board is set to Touchshield Slide)
For instance, i want to use a for loop to change the names of the files uploaded but it throws an error for :
PImage[] stonePit = new PImage[21];
PImage[] kalaPit = new PImage[49];
int i;[shadow=red,left][/shadow]
void setup (){
for (i=0; i <=TotalStone; i++)stonePit[i] = loadImage("Stonepit" + i + ".bmp");
for (i=0; i <=TotalKala; i++) kalaPit[i] = loadImage("KalaStone" + i + ".bmp");
The error being thrown is
"error: expected unqualified-id before '[' token" at both PImage[] lines at the top where I am defining my PImage array and for both of the for loops, I am getting error code
"error: 'stonePit' was not declared in this scope" and
"error: invalid operands of types 'const char*' and 'const." I've been working at this for hours and I am still not getting it. Maybe i need to do it without an array, but how do I dynamically point to different objects in the game?