PDA

View Full Version : Symbol never used?


TaLhA XIV
24/08/2012, 10:39 PM
#include <a_samp>
#include <ZCMD>
#if defined FILTERSCRIPT
#endif

enum fInfo{
SFCS,
SFCMS
}
new PlayerInfo[MAX_PLAYERS][fInfo];
stock SendFactionMessage(color, const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][SFCS] == 1)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}
CDM:f(playerid,params[])
{
if(PlayerInfo[playerid][SFCS] == 1 || PlayerInfo[playerid][SFCMS] == 1)
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /f [Message]");
new string[128];
format(string,sizeof(string), "[Faction Chat] %s(%d): %s",pname(playerid), playerid, params);
SendFactionMessage(-1, string);
return 1;
}
else
SendClientMessage(playerid,-1,"ERROR: You are not in a faction!");
}

C:\Users\TaLhA XIV\Desktop\Pawno scripter\filterscripts\factionchat.pwn(43) : warning 203: symbol is never used: "f"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

I don't know what is happening please help.

CoDeZ
24/08/2012, 10:44 PM
#include <a_samp>
#include <ZCMD>
#if defined FILTERSCRIPT
#endif

enum fInfo{
SFCS,
SFCMS
}
new PlayerInfo[MAX_PLAYERS][fInfo];
stock SendFactionMessage(color, const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][SFCS] == 1)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}
CMD:f(playerid,params[])
{
if(PlayerInfo[playerid][SFCS] == 1 || PlayerInfo[playerid][SFCMS] == 1)
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /f [Message]");
new string[128];
format(string,sizeof(string), "[Faction Chat] %s(%d): %s",pname(playerid), playerid, params);
SendFactionMessage(-1, string);
return 1;
}
else
{
SendClientMessage(playerid,-1,"ERROR: You are not in a faction!");
}
return 1;
}

TaLhA XIV
24/08/2012, 10:46 PM
#include <a_samp>
#include <ZCMD>
#if defined FILTERSCRIPT
#endif

enum fInfo{
SFCS,
SFCMS
}
new PlayerInfo[MAX_PLAYERS][fInfo];
stock SendFactionMessage(color, const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][SFCS] == 1)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}
CMD:f(playerid,params[])
{
if(PlayerInfo[playerid][SFCS] == 1 || PlayerInfo[playerid][SFCMS] == 1)
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /f [Message]");
new string[128];
format(string,sizeof(string), "[Faction Chat] %s(%d): %s",pname(playerid), playerid, params);
SendFactionMessage(-1, string);
return 1;
}
else
{
SendClientMessage(playerid,-1,"ERROR: You are not in a faction!");
}
return 1;
}


Still the same warning.

leonardo1434
24/08/2012, 10:47 PM
change to


#include <zcmd>

CoDeZ
24/08/2012, 10:48 PM
You sure? because it worked fine here
You just type CDM instead of CMD.

DonWade
24/08/2012, 10:55 PM
CDM ?

It should be CMD i guess

TaLhA XIV
24/08/2012, 10:55 PM
Thanks.