#1

PHP код:
//OnPlayerPickUpPickUp
    
new houseid = -1;
    new 
IDD IsPlayerNearHouse(playerid);
    for(new 
iddidd<MAX_HOUSESidd++)
    {
        if(
HouseInfo[idd][HousePickup] == pickupid)
        {
            
houseid idd;
            break;
        }
    }
    if(
houseid != -1)
    {
        new 
str[128];
        
format(str128"~y~Price: ~w~$%d~n~~y~Owner: ~w~%s~n~~y~House ID: ~w~%d"HouseInfo[houseid][HouseValue], HouseInfo[houseid][HouseOwner], IDD);
        
GameTextForPlayer(playeridstr60003);
        new 
ownerid GetPlayerID(HouseInfo[IDD][HouseOwner]);
        if(
ownerid == playerid)
        {
              
SetPlayerHealth(ownerid,100.0);
            
SetPlayerArmour(ownerid,100.0);
        }
    } 
Код:
[17:40:42] [debug] Run time error 4: "Array index out of bounds"
[17:40:42] [debug]  Attempted to read/write array element at negative index -1
[17:40:42] [debug] AMX backtrace:
[17:40:42] [debug] #0 00153c60 in public OnPlayerPickUpPickup (playerid=0, pickupid=1961) at D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:10825
[17:40:45] Saved 1982 Properties!
[17:40:51] [debug] Run time error 4: "Array index out of bounds"
[17:40:51] [debug]  Attempted to read/write array element at negative index -1
[17:40:51] [debug] AMX backtrace:
[17:40:51] [debug] #0 00153c60 in public OnPlayerPickUpPickup (playerid=0, pickupid=1961) at D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:10825
Reply


Messages In This Thread
AMX - by Loinal - 06.05.2017, 15:52
Re: AMX - by AbyssMorgan - 06.05.2017, 16:31
Re: AMX - by rt-2 - 06.05.2017, 17:12
Re: AMX - by Loinal - 06.05.2017, 21:28
Re: AMX - by rt-2 - 07.05.2017, 13:26
Re: AMX - by Loinal - 07.05.2017, 14:10
Re: AMX - by rt-2 - 08.05.2017, 04:24

Forum Jump:


Users browsing this thread: 1 Guest(s)