SA-MP Forums Archive
WARNING: 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: WARNING: tag mismatch (/showthread.php?tid=535003)



WARNING: tag mismatch - ranme15 - 01.09.2014

Warning:
Код:
warning 213: tag mismatch
Code:
Код:
stock GetPlayerKDR(playerid)
{
	new kills = dini_Int(pFile(playerid), "Kills");
	new deaths = dini_Int(pFile(playerid), "Deaths");
	new Float: result;
	result = kills / deaths;
	return result;
}
Line:
Код:
return result;



Re: WARNING: tag mismatch - Isolated - 01.09.2014

dini_Int returns an int, whereas you are assigning the int to a float.


Re: WARNING: tag mismatch - DavidBilla - 01.09.2014

pawn Код:
stock GetPlayerKDR(playerid)
{
    new kills = dini_Int(pFile(playerid), "Kills");
    new deaths = dini_Int(pFile(playerid), "Deaths");
    new Float: result[MAX_PLAYERS];
    result[playerid] = kills / deaths;
    return result[playerid];
}
Guess this'll work
@isolated, he's just getting the value of an int and using it for a float variable, guess that won't affect anything


Re: WARNING: tag mismatch - ranme15 - 01.09.2014

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
pawn Код:
stock GetPlayerKDR(playerid)
{
    new kills = dini_Int(pFile(playerid), "Kills");
    new deaths = dini_Int(pFile(playerid), "Deaths");
    new Float: result[MAX_PLAYERS];
    result[playerid] = kills / deaths;
    return result[playerid];
}
Guess this'll work
@isolated, he's just getting the value of an int and using it for a float variable, guess that won't affect anything
Tried yours and isolated's, both aren't working.


Re: WARNING: tag mismatch - Thogy - 01.09.2014

pawn Код:
stock GetPlayerKDR(playerid)
{
    new kills = dini_Int(pFile(playerid), "Kills");
    new deaths = dini_Int(pFile(playerid), "Deaths");
    new result;
    result = kills / deaths;
    return result;
}