Errors :)
#1

Whats Wrong with this code?
Код:
C:\Documents and Settings\Alastair Spencer\Desktop\Server\gamemodes\Lvvcn\Lscnr.pwn(1742) : warning 211: possibly unintended assignment
C:\Documents and Settings\Alastair Spencer\Desktop\Server\gamemodes\Lvvcn\Lscnr.pwn(1742) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Alastair Spencer\Desktop\Server\gamemodes\Lvvcn\Lscnr.pwn(1743) : error 029: invalid expression, assumed zero
Code Starts at line 1740 and ends at 1756
Код:
dcmd_stats(playerid,params[]) {
	new str[128],pName[24], pDeaths, player, pIP[50];
	if(!strlen(params,player = playerid))
	else player = strval(params);
	if(IsPlayerConnected(player))
	{
		GetPlayerName(playerid, pName, sizeof(pName));
		GetPlayerIp(playerid, pIP, sizeof(pIP));
 		if(PlayerInfo[player][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player][Deaths];
		SendClientMessage(playerid, COLOR_GREEN,"=========================================================");
		format(str, sizeof(str), "Name: [ %s ] Money: [ %d ] Ip: [ %s ]", pName, GetPlayerMoney(playerid), pIP);
		SendClientMessage(playerid, COLOR_GRAD1, str);
 		format(str, sizeof(str), "Kills: [ %d ] Deaths: [ %d ]  Ratio: [ %0.2f ] Skin: [ %d ]",PlayerInfo[player][Kills], PlayerInfo[player][Deaths], Float:PlayerInfo[player][Kills]/Float:pDeaths,GetPlayerSkin(playerid));
		SendClientMessage(playerid, COLOR_GRAD1, str);
		SendClientMessage(playerid, COLOR_GREEN,"=========================================================");
		return 1;
	}
Would love to see this problem get fixed. Thanks
Reply
#2

You can't use an if like this
pawn Код:
if(!strlen(params,player = playerid))
It needs to be

pawn Код:
if(!strlen(params)) player = playerid;
else player = strval(params);
Reply
#3

Quote:
Originally Posted by dice7
Посмотреть сообщение
You can't use an if like this
pawn Код:
if(!strlen(params,player = playerid))
It needs to be

pawn Код:
if(!strlen(params)) player = playerid;
else player = strval(params);
Thanks Very Much Mate!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)