Stats Command warnings
#1

hello,I made stats command,but I am getting 3 warnings.

Here is my script:
Код:
dcmd_stats(playerid,params[]) {
	new string[128];
	new name;
	name = GetPlayerName(playerid);
	playerid = strval(params);

	if(gPlayerLogged[playerid] = 1) {
 		format(string, sizeof(string), "| %s's Stats:  Kills: %d | Deaths: %d ",name, PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
		return SendClientMessage(playerid, COLOR_GREEN, string);
	} else return SendClientMessage(playerid, COLOR_RED, "Player Not Connected!");
}
Warnings:
Код:
C:\Users\bendra\Desktop\Samp Serveriai\Serv\gamemodes\LSTW2v2.pwn(2111) : warning 202: number of arguments does not match definition
C:\Users\bendra\Desktop\Samp Serveriai\Serv\gamemodes\LSTW2v2.pwn(2111) : warning 202: number of arguments does not match definition
C:\Users\bendra\Desktop\Samp Serveriai\Serv\gamemodes\LSTW2v2.pwn(2114) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Any help?
Reply
#2

ok fix code

pawn Код:
dcmd_stats(playerid,params[])
{
    new string[128];
    new name[MAX_PLAYER_NAME];
    name = GetPlayerName(playerid, name, sizeof(name));
    playerid = strval(params);
    if(gPlayerLogged[playerid] = 1)
    {
        format(string, sizeof(string), "| %s Stats:  Kills: %d | Deaths: %d ",name, PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
        SendClientMessage(playerid, COLOR_GREEN, string);
        return true;
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Player Not Connected!");
        return true;
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)