Erroristic problem :)
#1

list (not that all)
PHP код:
new
    
FalseNitroVeh[][MAX_VEHICLES] =
{
"417",
"425",
"430",
"611"
}; 
under ongamemodeinit
PHP код:
    for(new 0MAX_VEHICLESi++){
        
SetVehicleNumberPlate(i"CFHS");
        if(!
strcmp(FalseNitroVeh[i], GetPlayerVehicleID(i), true))//Error line
        
{
              
//Nothing
        
}
        else
        {
            
AddVehicleComponent(GetPlayerVehicleID(i),1010);
                 
//return 1;
        
}
        
SetVehicleToRespawn(i);
    } 
error:
Quote:

(error line) : error 035: argument type mismatch (argument 2)

Reply
#2

You are comparing a string with an vehicleid, this is not possible.
Also i guess you want to compare the model ID instead of vehicleid ?

This is much better:
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++){
        SetVehicleNumberPlate(i, "CFHS");
        switch(GetVehicleModel(i))
        {
            case 417,425,430,611: //if its one of these model id's
            default: //if this is not the case
            {
                AddVehicleComponent(GetPlayerVehicleID(i),1010);
            }
        }
        SetVehicleToRespawn(i);
    }
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)