SA-MP Forums Archive
Symbol never used? - 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)
+--- Thread: Symbol never used? (/showthread.php?tid=371915)



Symbol never used? - TaLhA XIV - 24.08.2012

PHP код:
#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 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
PlayerInfo[i][SFCS] == 1)
            {
                
SendClientMessage(icolorstring);
            }
        }
    }
    return 
1;
}
CDM:f(playerid,params[])
{
    if(
PlayerInfo[playerid][SFCS] == || 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), playeridparams);
        
SendFactionMessage(-1string);
        return 
1;
    }
    else
    
SendClientMessage(playerid,-1,"ERROR: You are not in a faction!");

PHP код:
C:\Users\TaLhA XIV\Desktop\Pawno scripter\filterscripts\factionchat.pwn(43) : warning 203symbol is never used"f"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Warning

I don't know what is happening please help.


Re: Symbol never used? - CoDeZ - 24.08.2012

pawn Код:
#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;
}



Re: Symbol never used? - TaLhA XIV - 24.08.2012

Quote:
Originally Posted by CoDeZ
Посмотреть сообщение
pawn Код:
#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.


Re: Symbol never used? - leonardo1434 - 24.08.2012

change to

pawn Код:
#include <zcmd>



Re: Symbol never used? - CoDeZ - 24.08.2012

You sure? because it worked fine here
You just type CDM instead of CMD.


Re: Symbol never used? - DonWade - 24.08.2012

CDM ?

It should be CMD i guess


Re: Symbol never used? - TaLhA XIV - 24.08.2012

Thanks.