Error's please help
#1

hello can someone please help me i get this

C:\Documents and Settings\james\Desktop\Titanium Roleplay GM\Copy of Titanium Roleplay with login\titanium.pwn(25) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYER_NAME")
C:\Documents and Settings\james\Desktop\Titanium Roleplay GM\Copy of Titanium Roleplay with login\titanium.pwn(344) : error 021: symbol already defined: "OnPlayerText"


line 25
Код:
#define MAX_PLAYER_NAME 24
line 343
Код:
public OnPlayerText(playerid, text[])
{
    if ( !IsPlayerConnected( playerid ) )
        return 0;

	if ( !IsPlayerSpawned( playerid ) )
	    return SendClientMessage( playerid, RED, "You must be spawned to talk!"), 0;

    if ( ChatDisabled == 1 )
	{
		if( pInfo[playerid][Adminlevel] == 0)
	    	return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Chat is disabled, only Administrators can talk!"), 0;
	}

	if ( playerMuted{ playerid } )
	    return SendClientMessage( playerid, RED, "You are muted, you cannot talk!"), 0;

    if ( text[ 0 ] == '!' && pInfo[ playerid ][ Adminlevel ] > 0 )
    {
        new str[ 128 ], pName[ MAX_PLAYER_NAME ];
        GetPlayerName( playerid, pName, sizeof ( pName ) );
        format( str, sizeof ( str ), "[AdminChat] %s [%d] : %s", pName, playerid, text[ 1 ] );
    	SendMessageToAdmins(-1, str );
        return 0;
    }
    for(new d; d<sizeof(Filter); d++)
    if(strfind(text,Filter[d],true) != -1)
    {
    	SendClientMessage(playerid,RED,"ERROR:{FFFFFF} Censored word!");
    	return 0;
    }
    new string[128];
    format(string, sizeof(string), "%s[%d]: {FFFFFF}%s", GetName( playerid ), playerid, text);
    SendClientMessageToAll( GetPlayerColor( playerid ), string );

    return 0;
}
Reply
#2

Ok, for the first one delete #define MAX_PLAYER_NAME 24 , because it's already defined.
Same thing for the second one.
Look into your gamemode and you will see that you got two functions OnPlayerText.
Delete this one and add the content from it to the other one.
Reply
#3

Thanks aly +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)