error 079: inconsistent return types (array & non-array)
#4

(7805) : error 033: array must be indexed (variable "GunObjects")
(7809) : error 033: array must be indexed (variable "GunObjects")
(7832) : error 033: array must be indexed (variable "GunObjects")
(7834) : error 035: argument type mismatch (argument 1)

This is the full code.. I am getting messed up..

Код:
stock PickupGun(weaponid)
{
    if (weaponid < 0 || weaponid > 64)
    {
        GunObjects[weaponid] = -1;
    }
    else
    {
        GunObjects[weaponid] = weaponid;
    }
    return 1;
}

stock DropGun(playerid,weaponid,weaponammo,Float:X,Float:Y,Float:Z,VirtualWorld,Interior)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    if(weaponid != 0 && weaponid != 0)
    {
        for(new i = 0; i < sizeof(wInfo); i++)
        {
            if(wInfo[i][GunPosX] == 0.0 && wInfo[i][GunPosY] == 0.0 && wInfo[i][GunPosZ] == 0.0)
            {
                wInfo[i][GunAmount][0] = weaponid;
                wInfo[i][GunAmount][1] = weaponammo;
                wInfo[i][GunPosX] = X;
                wInfo[i][GunPosY] = Y;
                wInfo[i][GunPosZ] = Z;
                wInfo[i][GunWorld] = VirtualWorld;
                wInfo[i][GunInterior] = Interior;
                PickupGun(weaponid);
				if(GunObjects[weaponid] != -1)
				{
				GunObject[i] = CreateDynamicObject(GunObjects[weaponid], X, Y, Z-1, 80.0, 0.0, 0.0, VirtualWorld, -1, -1, 200.0);
				}
                return 1;
            }
        }
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)