SA-MP Forums Archive
Tag Mismatch - 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 (/showthread.php?tid=618224)



Tag Mismatch - qUneT - 02.10.2016

Hi i have a problem, i use Y_ini login/register system, this is the code:
Код:
Payday()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	..................................................
		
		new Float:cateoreprimeste, Float:secundejucate = PlayerInfo[i][pSecundeJucate];
        cateoreprimeste = secundejucate / 3600;
        
        new Float:cateoreavea = PlayerInfo[i][pOreJucate];
        cateoreavea += cateoreprimeste;

		new szStr[ 32 ];
		format( szStr, sizeof szStr, "%.2f", cateoreavea);
        PlayerInfo[i][pOreJucate] = cateoreavea; -------------------------------- here's the error
		
		if(PlayerInfo[i][pRentHouseID] != 0)
		{
			PlayerInfo[i][pBankMoney] -= HousesInfo[hid][hRentPrice];
			HousesInfo[hid][hMoney] += HousesInfo[hid][hRentPrice];
			totalearnings = totalearnings-HousesInfo[hid][hRentPrice];
		}
		
        totalearnings = totalearnings+interest;
        
		SendClientMessage(i,-1,"---------------------------------PAYDAY---------------------------------");
		format(stringy21, sizeof(stringy21), "Salariu: %s$ | Bani in banca: %s$ | Dobanda: %s$ | Taxa: %s$ (10 procente) | Ore Jucate: %.2f", AddCommasToInt(paycheck), AddCommasToInt(PlayerInfo[i][pBankMoney]), AddCommasToInt(interest), AddCommasToInt(taxa),szStr);
		..................................................
}



Re: Tag Mismatch - CannonBolt - 02.10.2016

Код:
Payday()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	..................................................
		
		new Float:cateoreprimeste, Float:secundejucate = PlayerInfo[i][pSecundeJucate];
        cateoreprimeste = secundejucate / 3600;
        
        new Float:cateoreavea = PlayerInfo[i][pOreJucate];
        cateoreavea += cateoreprimeste;

		new szStr[ 32 ];
		format( szStr, sizeof(szStr), "%.2f", cateoreavea);
        PlayerInfo[i][pOreJucate] = cateoreavea; -------------------------------- here's the error
		
		if(PlayerInfo[i][pRentHouseID] != 0)
		{
			PlayerInfo[i][pBankMoney] -= HousesInfo[hid][hRentPrice];
			HousesInfo[hid][hMoney] += HousesInfo[hid][hRentPrice];
			totalearnings = totalearnings-HousesInfo[hid][hRentPrice];
		}
		
        totalearnings = totalearnings+interest;
        
		SendClientMessage(i,-1,"---------------------------------PAYDAY---------------------------------");
		format(stringy21, sizeof(stringy21), "Salariu: %s$ | Bani in banca: %s$ | Dobanda: %s$ | Taxa: %s$ (10 procente) | Ore Jucate: %.2f", AddCommasToInt(paycheck), AddCommasToInt(PlayerInfo[i][pBankMoney]), AddCommasToInt(interest), AddCommasToInt(taxa),szStr);
		..................................................
}



Re: Tag Mismatch - qUneT - 02.10.2016

Same error


Re: Tag Mismatch - CannonBolt - 02.10.2016

Point out the line.


Re: Tag Mismatch - iLearner - 02.10.2016

Show us where you defined

"pOreJucate"


Re: Tag Mismatch - qUneT - 02.10.2016

(2974) : warning 213: tag mismatch

Код:
PlayerInfo[i][pOreJucate] = cateoreavea;
cateoreavea is a float, [code]PlayerInfo[i][pOreJucate] is not. That's the problem


Re: Tag Mismatch - DavidGravelli - 02.10.2016

pawn Код:
Payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        ..................................................
       
    new Float:cateoreprimeste, Float:secundejucate = PlayerInfo[i][pSecundeJucate];
        cateoreprimeste = secundejucate / 3600;
       
        new Float:cateoreavea = PlayerInfo[i][pOreJucate];
        cateoreavea += cateoreprimeste;

    new szStr[ 32 ];
    format( szStr, sizeof(szStr), "%.2f", cateoreavea);
        PlayerInfo[i][pOreJucate] = cateoreavea; -------------------------------- here's the error
       
    if(PlayerInfo[i][pRentHouseID] != 0)
    {
       PlayerInfo[i][pBankMoney] -= HousesInfo[hid][hRentPrice];
       HousesInfo[hid][hMoney] += HousesInfo[hid][hRentPrice];
       totalearnings = totalearnings-HousesInfo[hid][hRentPrice];
    }  
           totalearnings = totalearnings+interest;
       
       SendClientMessage(i,-1,"---------------------------------PAYDAY---------------------------------");
       format(stringy21, sizeof(stringy21), "Salariu: %s$ | Bani in banca: %s$ | Dobanda: %s$ | Taxa: %s$            (10 procente) | Ore Jucate: %.2f", AddCommasToInt(paycheck), AddCommasToInt(PlayerInfo[i][pBankMoney]),      AddCommasToInt(interest), AddCommasToInt(taxa),szStr);
        ..................................................
}



Re: Tag Mismatch - Kaliber - 02.10.2016

//Edit:

In your enum write:
Код:
Float:pOreJucate



Re: Tag Mismatch - iLearner - 02.10.2016

Код:
enum pInfo
{
    pPass,
    pCash,
    pAdminLevel,
    pKills,
    pDeaths,
	pSkin,
	pColor,
	pLevel,
	pRespectPoints,
	pWantedLevel,
	pSex,
	pAge,
	pRegistredIP,
	pEmail,
	pMuted,
	pMuteTime,
	pHouseID,
	pChangeSpawn,
	pCarLic,
	pBoatLic,
	pPlaneLic,
	pWeaponLic,
	pJob,
	pWarns,
	pRentHouseID,
	pFactionID,
	pRobPoints,
	pBankMoney,
	Float:pOreJucate,
	pFactionRank,
	Float:pSecundeJucate
}



Re: Tag Mismatch - qUneT - 02.10.2016

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
//Edit:

In your enum write:
Код:
Float:pOreJucate
I tried.