SA-MP Forums Archive
anoying warning - 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: anoying warning (/showthread.php?tid=312248)



anoying warning - milanosie - 20.01.2012

hey there, my /stats give me Tag MisMatch

pawn Код:
CMD:stats(playerid, params[])
{
    new string[256], string2[256], string3[256], string4[256], string5[256], string6[256];
    new name[MAX_PLAYER_NAME];
    new health[MAX_PLAYERS], armour[MAX_PLAYERS];
        GetPlayerName(playerid, name, sizeof(name));
-->>>>  GetPlayerHealth(playerid, health[playerid]);
-->>>>  GetPlayerArmour(playerid, armour[playerid]);
    format(string, sizeof(string), "||==================================|| %s ||==================================|| ", name);
    format(string2, sizeof(string2), "Money %d || Level %d || Phone %s || Admin Rank %d ",GetPlayerMoney(playerid), GetPlayerScore(playerid), PlayerInfo[playerid][PhoneNumber], PlayerInfo[playerid][AdminLevel] );
    format(string3, sizeof(string3), "Faction %d || Faction Rank %d || Job %d ", PlayerInfo[playerid][Fmember], PlayerInfo[playerid][Frank], PlayerInfo[playerid][pJob]);
    format(string4, sizeof(string4), "Warnings %d || Health %d || Armour %d ", PlayerInfo[playerid][Warns], health, armour );
    format(string5, sizeof(string5), "Interior %d || Virtual World %d || Skin %d ",GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), GetPlayerSkin(playerid));
    SendClientMessage(playerid, COLOR_GREY, string);
    SendClientMessage(playerid, COLOR_GREEN, string2);
    SendClientMessage(playerid, COLOR_GREY, string3);
    SendClientMessage(playerid, COLOR_GREEN, string4);
    SendClientMessage(playerid, COLOR_GREY, string5);
    return 1;
}



Re: anoying warning - Konstantinos - 20.01.2012

pawn Код:
new Float:health, Float:armour;

GetPlayerHealth(playerid, health);
//



Re: anoying warning - Vince - 20.01.2012

Don't use that many large strings! Especially when you don't need them.
https://sampforum.blast.hk/showthread.php?tid=55261