16.07.2016, 13:15
So -1 is passed in an array in the command (not some function is called in the command). Let's review the code:
Which are the arrays?
"playerid" cannot be an invalid so the two left are:
"vehicleid" will be either 0 or the vehicle ID so we exclude it as well and the one left is:
and we know that "carid" can be -1 in certain situations. Where it gets odd is that you check about the value being different than -1 so if it was an invalid, the rest shouldn't be checked at all. Can you add printf to debug it manually?
pawn Код:
if (carid != -1 && Car_IsOwner(playerid, carid) || CoreVehicles[vehicleid][vehTemporary] || (PlayerData[playerid][pFaction] != -1 && CarData[carid][carFaction] == GetFactionType(playerid)) || IsAJobVehicle(vehicleid) || PlayerData[playerid][pCarKeys] == carid) // line 28644
pawn Код:
CoreVehicles[vehicleid][vehTemporary]
PlayerData[playerid][pFaction]
CarData[carid][carFaction]
PlayerData[playerid][pCarKeys]
pawn Код:
CoreVehicles[vehicleid][vehTemporary]
CarData[carid][carFaction]
pawn Код:
CarData[carid][carFaction]