SA-MP Forums Archive
Tag mismatch , i hate this shit !! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch , i hate this shit !! (/showthread.php?tid=657134)



Tag mismatch , i hate this shit !! - R3SpaWn0 - 01.08.2018

PHP код:
    new Float:xFloat:yFloat:zFloat:a;
    new 
carid Car_Nearest(playerid);
    new 
id Car_GetID(vehicleid);
    new 
Float:vHealth;
    new 
veh;
    
veh GetPlayerVehicleID(playerid);
    
GetVehicleHealth(vehvHealth);
    
GetVehiclePos(vehicleid,x,y,z);
    
GetVehicleZAngle(vehicleid,a);
    
CarData[carid][carPos][0] = x;
    
CarData[carid][carPos][1] = y;
    
CarData[carid][carPos][2] = z;
    
CarData[carid][carPos][3] = a;
    
CarData[carid][carHealth] = vHealth//ERROR TAG MISMATCH !!!!!!!
    
Car_Save(id);
    
SQL_SaveCharacter(playerid);
    return 
1;

CarData[carid][carHealth] = vHealth; error tag mismatch here -.-


PHP код:
        CarData[i][carExists] = true;
        
CarData[i][carID] = cache_get_field_int(i"carID");
        
CarData[i][carModel] = cache_get_field_int(i"carModel");
        
CarData[i][carOwner] = cache_get_field_int(i"carOwner");
        
CarData[i][carPos][0] = cache_get_field_float(i"carPosX");
        
CarData[i][carPos][1] = cache_get_field_float(i"carPosY");
        
CarData[i][carPos][2] = cache_get_field_float(i"carPosZ");
        
CarData[i][carPos][3] = cache_get_field_float(i"carPosR");
        
CarData[i][carColor1] = cache_get_field_int(i"carColor1");
        
CarData[i][carColor2] = cache_get_field_int(i"carColor2");
        
CarData[i][carPaintjob] = cache_get_field_int(i"carPaintjob");
        
CarData[i][carLocked] = cache_get_field_int(i"carLocked");
        
CarData[i][carImpounded] = cache_get_field_int(i"carImpounded");
        
CarData[i][carImpoundPrice] = cache_get_field_int(i"carImpoundPrice");
        
CarData[i][carFaction] = cache_get_field_int(i"carFaction");
           
CarData[i][carFuel] = cache_get_field_int(i"carFuel");
        
CarData[i][carHealth] = cache_get_field_float(i"carHealth"); // AND OTHER HERE 
CarData[i][carHealth] = cache_get_field_float(i, "carHealth"); AND HERE WTF? ITS CTRL + C FROM THE OTHER , I DONT UNDERSTAND WHY ((: HELP


Re: Tag mismatch , i hate this shit !! - KinderClans - 01.08.2018

If im not wrong:

pawn Код:
CarData[carid][carHealth] = vHealth(veh);
Otherwise show us your carhealth enum.


Re: Tag mismatch , i hate this shit !! - R3SpaWn0 - 01.08.2018

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
If im not wrong:

pawn Код:
CarData[carid][carHealth] = vHealth(veh);
Otherwise show us your carhealth enum.
i will try it now to see what happens, here is

EDIT: No, it gives me 4 errors now



enum carData {
carID,
carExists,
carModel,
carOwner,
Float:carPos[4],
carColor1,
carColor2,
carPaintjob,
carLocked,
carMods[14],
carImpounded,
carImpoundPrice,
carFaction,
carWeapons[5],
carAmmo[5],
carFuel,
carHealth,
carVehicle

};


thanks


Re: Tag mismatch , i hate this shit !! - Yuri8 - 01.08.2018

carHealth needs to be a float. So replace carHealth with Float:carHealth and it should work.


Re: Tag mismatch , i hate this shit !! - R3SpaWn0 - 01.08.2018

Quote:
Originally Posted by Yuri8
Посмотреть сообщение
carHealth needs to be a float. So replace carHealth with Float:carHealth and it should work.
Oh shit, i love you +rep !! <3


EDIT: How to +rep?!