warning 202
#1

ERROR
Код:
warning 202: number of arguments does not match definition
7

LINE
Код:
SCM(playerid, COLOR_ORANGE, "[SERVER]: "COL_GREY"Ulogiran si kao "COL_ORANGE"Admin "COL_GREY"["COL_CYAN"%d"COL_GREY"].", PlayerInfo[playerid][pAdmin]);
Reply
#2

could you show all the code?
Reply
#3

I had the same error before, i don't know how to fix it but i had to remove the colors
pawn Код:
SCM(playerid, COLOR_ORANGE, "[SERVER]:Ulogiran si kao Admin %d", PlayerInfo[playerid][pAdmin]);
Edit:
Isn't SendClientMessage(playerid, color, "text"); ?
Reply
#4

Код:
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    SetPlayerScore(playerid,PlayerInfo[playerid][pScores]);
   					SetSpawnInfo(playerid, PlayerInfo[playerid][pSkin], 0, 1310.3594,-1370.1094,13.5715,177.9343, 0, 0, 0, 0, 0, 0);
                	SpawnPlayer(playerid);
                	GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
                	SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
                	SetPlayerTime(playerid, 22, 0);
                	IsLogged[playerid] = true;
               		ClearText(playerid);
               		SavePlayer(playerid);
///////////////////////////
                    {
                    new string[512];
                    SCM(playerid, COLOR_ORANGE, "________________________________________________________________________________________________________________________");
        			format(string, sizeof(string), ""COL_GREY"Dobrodosao na server "COL_CYAN"%s"COL_GREY" ,ljepo te vidjeti opet na serveru.", GetName(playerid));
					SendClientMessage(playerid, COLOR_ORANGE, string);
                   	if(PlayerInfo[playerid][pAdmin] > 1)
	                SCM(playerid, COLOR_ORANGE, ""COL_GREY"Ulogiran si kao "COL_ORANGE"Admin "COL_GREY"["COL_CYAN"%d"COL_GREY"].", PlayerInfo[playerid][pAdmin]);
                    SCM(playerid, COLOR_ORANGE, "________________________________________________________________________________________________________________________");
                    }
                    new string[128];
                    if(PlayerInfo[playerid][pAdmin] > 1)
                    {
                    format(string, 128, "[SERVER]: "COL_GREY"Admin "COL_ORANGE"%s "COL_GREY"["COL_CYAN"%d"COL_GREY"] je usao na server.", GetName(playerid), PlayerInfo[playerid][pAdmin]);
                    SendMessageToAdmins(COLOR_ORANGE, string);
                    }
                }
                else
                {
                     SendClientMessage(playerid, COLOR_RED, "[SERVER]: "COL_WHITE"Izbaceni ste sa servera jer ste pogrijesili lozinku!");
                     SetTimer("KickTime", 500, 0);
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#5

try this
PHP код:
SCM(playeridCOLOR_ORANGE"[SERVER]: {CCCCCC}Ulogiran si kao{FFCC66}Admin {CCCCCC}{66ccff}["%d{CCCCCC}].", PlayerInfo[playerid][pAdmin]); 
Reply
#6

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
try this
PHP код:
SCM(playeridCOLOR_ORANGE"[SERVER]: {CCCCCC}Ulogiran si kao{FFCC66}Admin {CCCCCC}{66ccff}["%d{CCCCCC}].", PlayerInfo[playerid][pAdmin]); 
again warning
Reply
#7

Edit: You might want to fix the indentations.
pawn Код:
case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    SetPlayerScore(playerid,PlayerInfo[playerid][pScores]);
                    SetSpawnInfo(playerid, PlayerInfo[playerid][pSkin], 0, 1310.3594,-1370.1094,13.5715,177.9343, 0, 0, 0, 0, 0, 0);
                    SpawnPlayer(playerid);
                    GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
                    SetPlayerTime(playerid, 22, 0);
                    IsLogged[playerid] = true;
                    ClearText(playerid);
                    SavePlayer(playerid);
///////////////////////////
                    {
                    new string[128];
                    new str[128];
                    SCM(playerid, COLOR_ORANGE, "________________________________________________________________________________________________________________________");
                    format(string, sizeof(string), ""COL_GREY"Dobrodosao na server "COL_CYAN"%s"COL_GREY" ,ljepo te vidjeti opet na serveru.", GetName(playerid));
                    SendClientMessage(playerid, COLOR_ORANGE, string);
                    if(PlayerInfo[playerid][pAdmin] > 1)
                        format(str, sizeof(str), ""COL_GREY"Ulogiran si kao "COL_ORANGE"Admin "COL_GREY"["COL_CYAN"%d"COL_GREY"].", PlayerInfo[playerid][pAdmin]);
                    SCM(playerid, COLOR_ORANGE, str);
                    SCM(playerid, COLOR_ORANGE, "________________________________________________________________________________________________________________________");
                    }
                    new string[128];
                    if(PlayerInfo[playerid][pAdmin] > 1)
                    {
                    format(string, 128, "[SERVER]: "COL_GREY"Admin "COL_ORANGE"%s "COL_GREY"["COL_CYAN"%d"COL_GREY"] je usao na server.", GetName(playerid), PlayerInfo[playerid][pAdmin]);
                    SendMessageToAdmins(COLOR_ORANGE, string);
                    }
                }
                else
                {
                     SendClientMessage(playerid, COLOR_RED, "[SERVER]: "COL_WHITE"Izbaceni ste sa servera jer ste pogrijesili lozinku!");
                     SetTimer("KickTime", 500, 0);
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#8

If there is still an error/warning, then show us your "SCM" function
Reply
#9

are you trying to send a formated message with SendClientMessage ? !!!!!!
you have to format it !!

Note: Add colores if you want !

pawn Код:
new string[128];
format(string,sizeof(string),"[SERVER]:Ulogiran si kao Admin %d", PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid,~0,string);
Reply
#10

Quote:
Originally Posted by Mamal75
Посмотреть сообщение
are you trying to send a formated message with SendClientMessage ? !!!!!!
you have to format it !!

Note: Add colores if you want !

pawn Код:
new string[128];
format(string,sizeof(string),"[SERVER]:Ulogiran si kao Admin %d", PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid,~0,string);
Exactly what I was thinking. Using format specifiers in a SendClientMessage will end up crashing the client to whom the SendClientMessage is shown.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)