[REP++ WHO HELPS] Run time error 4: "Array index out of bounds"
#2

try this? o.o
PHP код:
new TurfInfo[26][ttInfo];

new 
TurfInfo[26];



CMD:attack(playeridparams[])
{
    new 
turfid;
    for(new 
xf 0xf <= sizeof(TurfInfo); xf++)
    {
         if(
IsPlayerInRangeOfPoint(playerid4.0TurfInfo[xf][ttPosX], TurfInfo[xf][ttPosY], TurfInfo[xf][ttPosZ]))
           {
                    
turfid xf;
            break;
        }
    }
    if(
turfid == 0) return SendClientMessage(playerid, -1"ERROR!");
    }
    else if(
turfid 0) return SendClientMessage(playerid, -1"SUCCES!");
    }
    else { 
SendClientMessage(playerid, -1"YOUR MESSAGE IF NOT IN A TURF");
    }
    return 
1;

Reply


Messages In This Thread
[REP++ WHO HELPS] Run time error 4: "Array index out of bounds" - by buburuzu19 - 14.08.2015, 08:30
Re: [REP++ WHO HELPS] Run time error 4: "Array index out of bounds" - by jlalt - 14.08.2015, 08:55
Re: [REP++ WHO HELPS] Run time error 4: "Array index out of bounds" - by DTV - 14.08.2015, 09:02
Re: [REP++ WHO HELPS] Run time error 4: "Array index out of bounds" - by MarvinPWN - 14.08.2015, 09:21

Forum Jump:


Users browsing this thread: 1 Guest(s)