SA-MP Forums Archive
Small Error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Small Error (/showthread.php?tid=70844)



Small Error - mini-d - 28.03.2009

Hey heres a small error with my cmd admins

Error
Код:
D:\My Documents\Freeroam\Freeroamv13(1).pwn(18457) : error 029: invalid expression, assumed zero
D:\My Documents\Freeroam\Freeroamv13(1).pwn(19471) : warning 204: symbol is assigned a value that is never used: "plname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
CMD
Код:
	if(strcmp(cmd, "/admins", true) == 0)
	{
		SendClientMessage(playerid,GREEN,"Online Admins:");
		for(new i=0;i<MAX_PLAYERS;i++)
		{
		if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 0
 {
		GetPlayerName(i,string,sizeof(string));
		format(string,sizeof(string),"- %s (%d), Level: %d",string,i,PlayerInfo[i][pAdmin]);//name,id,level
		SendClientMessage(playerid,PURPLE,string);
		}
		}
		return 1;
	}



Re: Small Error - [HiC]TheKiller - 28.03.2009

pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
    {
        SendClientMessage(playerid,GREEN,"Online Admins:");
        for(new i=0;i<MAX_PLAYERS;i++)
        {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 0)
 {
        GetPlayerName(i,string,sizeof(string));
        format(string,sizeof(string),"- %s (%d), Level: %d",string,i,PlayerInfo[i][pAdmin]);//name,id,level
        SendClientMessage(playerid,PURPLE,string);
        }
        }
        return 1;
    }
(Missing a bracket on line 6)