Tag Mismatch
#1

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);
		..................................................
}
Reply
#2

Код:
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);
		..................................................
}
Reply
#3

Same error
Reply
#4

Point out the line.
Reply
#5

Show us where you defined

"pOreJucate"
Reply
#6

(2974) : warning 213: tag mismatch

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

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);
        ..................................................
}
Reply
#8

//Edit:

In your enum write:
Код:
Float:pOreJucate
Reply
#9

Код:
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
}
Reply
#10

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)