Symbol never used?
#1

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.
Reply
#2

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;
}
Reply
#3

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.
Reply
#4

change to

pawn Код:
#include <zcmd>
Reply
#5

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

CDM ?

It should be CMD i guess
Reply
#7

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)