Quote:
Originally Posted by Konstantinos
So -1 is passed in an array in the command (not some function is called in the command). Let's review the code:
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
Which are the arrays?
pawn Код:
CoreVehicles[vehicleid][vehTemporary]
PlayerData[playerid][pFaction]
CarData[carid][carFaction]
PlayerData[playerid][pCarKeys]
"playerid" cannot be an invalid so the two left are:
pawn Код:
CoreVehicles[vehicleid][vehTemporary]
CarData[carid][carFaction]
"vehicleid" will be either 0 or the vehicle ID so we exclude it as well and the one left is:
pawn Код:
CarData[carid][carFaction]
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?
|
Uh, what do I need to printf? I'm confused. :P