Help me please...
#1

pawn Код:
command(togglea, playerid, params[])
{
    #pragma unused params
    new string[ 128 ];
    if( Player[playerid][AdminLevel] >= 6)
    {
        if(adminenabled == 0 )
        {
            format( string, sizeof( string ), "%s has enabled the Admin Chat.", GetName( playerid ) );
            adminenabled = 1;
            SendToAdmins(LIGHTGREEN, string);
        }
        else if(adminenabled == 1)
        {
            format( string, sizeof( string ), "%s has disabled the Adin Chat.", GetName( playerid ) );
            adminenabled = 0;
            SendToAdmins(RED, string);
        }
    }
    return 1;
}
Hmm ok asking for help again (embarrassed much) but ehh here's the problem. I'm trying to make it so that /togglea will toggle the admin chat. It has become apparent that i need this command working and this is the warnings i recieve...

pawn Код:
C:\Users\Callum\Desktop\1996RP\Windows\gamemodes\1996RP.pwn(30518) : warning 202: number of arguments does not match definition
C:\Users\Callum\Desktop\1996RP\Windows\gamemodes\1996RP.pwn(30524) : warning 202: number of arguments does not match definition
I have also changed the string number several times with no effect. All help will be helpful :S
Reply
#2

Its because you add more params than the original one.

EX: It's KillPlayer(playerid); and you put KillPlayer(playerid,0,0,0);
It's caused because it haves extra params in the function.
Reply
#3

And what are thoose lines? Maybe something is wrong with your own custom funcs. Like: SendToAdmins or your "Player" enum.
Reply
#4

Quote:
Originally Posted by Marricio
Посмотреть сообщение
Its because you add more params than the original one.

EX: It's KillPlayer(playerid); and you put KillPlayer(playerid,0,0,0);
It's caused because it haves extra params in the function.
Ok, so how can i go about fixing this? It was
pawn Код:
SendClientMessageToAll
and i changed it to
pawn Код:
SendToAdmins
thats when i got the warnings :S
Reply
#5

You got missing params, or extra params in the SendToAdmins

Show your public/stock SendToAdmins
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)