Okay, so I figured instead of making a new thread, I would just post this issue here. I'm now having trouble checking for a clientr flag while using a for loop in the check. I'm setting temp.i using a for loop, than trying to check a clientr flag using temp.i, atm i'm trying clientr.backpack_size(@ i+1), but it keeps returning as null when it should return as either "Small" or "Medium" Can anyone tell me how to fix this? Here's the code:
PHP Code:
function displayBackPacks()
{
temp.mXY = {mousescreenx, mousescreeny};
for ( temp.i = 0; temp.i < clientr.backpack_slots; temp.i++ ) {
temp.displayXY = { screenwidth - 240 + (58 * i), screenheight - 50 };
with ( findImg( 200 + i ) ) {
image = "necro_gui_iconbox.gif";
mode = 1;
layer = 4;
red = green = blue = 1;
alpha = .65;
x = displayXY[0];
y = displayXY[1];
}
if ( clientr.backpack_size(@ i+1 ) != nil ) {
with ( findImg( 205 + i ) ) {
image = "necro_gui_backpack1_1.gif";
mode = 1;
layer = 5;
red = green = blue = 1;
alpha = .65;
x = displayXY[0] - 3;
y = displayXY[1] - 5;
}
}
if ( mXY[0] in |displayXY[0], displayXY[0] + 34| &&
mXY[1] in |displayXY[1], displayXY[1] + 34| ) {
temp.sizeCheck = clientr.backpack_size(@ i+1);
player.chat = sizeCheck @" Backpack #"@ i+1;
}
}
}