anoying warning
#1

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

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

GetPlayerHealth(playerid, health);
//
Reply
#3

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


Forum Jump:


Users browsing this thread: 2 Guest(s)