OnPlayerDisconnect :'(
#1

i added this at OnPlayerDisconnect:
pawn Код:
new str[256];
    switch(reason)
    {
        case 0: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Crash){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
        case 1: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Quit){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
        case 2: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "Red"(Kick/Ban){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );//this is line 1196
    }
    SendClientMessageToAll( -1, str );

and i am getting this errors :


pawn Код:
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\gamemodes\usfMain.pwn(1196) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

please help me to solve this please
Reply
#2

Try This: +Rep if I helped you
pawn Код:
new str[256];
    switch(reason)
    {
        case 0: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Crash){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
        case 1: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Quit){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
        case 2: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Kick/Ban){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );//this is line 1196
    }
    SendClientMessageToAll( -1, str );
Reply
#3

both are same anyhow
no use
Reply
#4

Replace:
pawn Код:
has disconnected "Red"(Kick/Ban)
with:
pawn Код:
has disconnected "RED"(Kick/Ban)
Looks like you have mixed up 'RED' and 'Red' which are two different macros/definitions. One would be a text replacement in embedding form, and the other would be a hex value, you have accidentally swapped the two.
Reply
#5

didnt notice anyhow thanks for the help

**/me blind :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)