Not sure where that other i came from
but still no joy.
I am using this as a test with same result:
int i = 1;
int level_texture_image = agk::LoadImage("level_blocks.png");
std::string png = ".png";
std::string lvlPath = agk::Str(i) + png;
int blk = agk::LoadSubImage(level_texture_image, lvlPath);
This is my tier 1 code:
level_texture_image = LoadImage("level_blocks.png")
for i = 1 to numberLvlBlocks
lvlBlock[i].iImage = LoadSubImage(level_texture_image, str(i) + ".png")
next i
It's as if the command isn't there in tier 2.
[EDIT] - Here is my code in C++ to match the tier 1 but not having LoadSubImage for some reason. Baffled
int i = 1;
int level_texture_image = agk::LoadImage("level_blocks.png");
std::string png = ".png";
for (i=1; i==numberLvlBlocks; i++)
{
std::string lvlPath = agk::Str(i) + png;
iImage[i] = agk::LoadSubImage(level_texture_image, lvlPath);
}
This is the error message:
This is the Class where it is being used:
class LevelBlockClass
{
private:
int iImage[numberLvlBlocks+1]; // 64 is [numberLvlBlocks]
char sLevelSection[numberLvlBlocks+1]; // 64 is [numberLvlBlocks]
public:
void setLvlBlockImage(int ID, int value) {iImage[ID] = value;}
int getLvlBlockImage(int ID) {return iImage[ID];}
void setLvlBlockSection(int ID, char value) {sLevelSection[ID] = value;}
char getLvlBlockSection(int ID) {return sLevelSection[ID];}
void loadLevelImages(void)
{
int i = 1;
int level_texture_image = agk::LoadImage("level_blocks.png");
std::string png = ".png";
for (i=1; i==numberLvlBlocks; i++)
{
std::string lvlPath = agk::Str(i) + png;
iImage[i] = agk::LoadSubImage(level_texture_image, lvlPath);
}
sLevelSection[1] = '1';
sLevelSection[2] = '2';
sLevelSection[3] = '3';
sLevelSection[4] = '4';
sLevelSection[5] = '5';
sLevelSection[6] = '6';
sLevelSection[7] = '7';
sLevelSection[8] = '8';
sLevelSection[9] = '9';
sLevelSection[10] = 'A';
sLevelSection[11] = 'B';
sLevelSection[12] = 'C';
sLevelSection[13] = 'D';
sLevelSection[14] = 'E';
sLevelSection[15] = 'F';
sLevelSection[16] = 'G';
sLevelSection[17] = 'H';
sLevelSection[18] = 'I';
sLevelSection[19] = 'J';
sLevelSection[20] = 'K';
sLevelSection[21] = 'L';
sLevelSection[22] = 'M';
sLevelSection[23] = 'N';
sLevelSection[24] = 'O';
sLevelSection[25] = 'P';
sLevelSection[26] = 'Q';
sLevelSection[27] = 'R';
sLevelSection[28] = 'S';
sLevelSection[29] = 'T';
sLevelSection[30] = 'U';
sLevelSection[31] = 'V';
sLevelSection[32] = 'W';
sLevelSection[33] = 'X';
sLevelSection[34] = 'Y';
sLevelSection[35] = 'Z';
sLevelSection[36] = 'a';
sLevelSection[37] = 'b';
sLevelSection[38] = 'c';
sLevelSection[39] = 'd';
sLevelSection[40] = 'e';
sLevelSection[41] = 'f';
sLevelSection[42] = 'g';
sLevelSection[43] = 'h';
sLevelSection[44] = 'i';
sLevelSection[45] = 'j';
sLevelSection[46] = 'k';
sLevelSection[47] = 'l';
sLevelSection[48] = 'm';
sLevelSection[49] = 'n';
sLevelSection[50] = 'o';
sLevelSection[51] = 'p';
sLevelSection[52] = 'q';
sLevelSection[53] = 'r';
sLevelSection[54] = 's';
sLevelSection[55] = 't';
sLevelSection[56] = 'u';
sLevelSection[57] = 'v';
sLevelSection[58] = 'w';
sLevelSection[59] = 'x';
sLevelSection[60] = 'y';
sLevelSection[61] = 'z';
sLevelSection[62] = '$';
sLevelSection[63] = '%';
sLevelSection[64] = '&';
}
};
LevelBlockClass lvlBlock;
// ****************************************************************
// ****************************************************************
// INITIATE FUNCTION CALLS
// ****************************************************************
// ****************************************************************
lvlBlock.loadLevelImages();