SA-MP Forums Archive
Help me please... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me please... (/showthread.php?tid=229424)



Help me please... - Vero - 21.02.2011

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


Re: Help me please... - Marricio - 21.02.2011

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.


Re: Help me please... - Mean - 21.02.2011

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


Re: Help me please... - Vero - 21.02.2011

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


Re: Help me please... - Marricio - 21.02.2011

You got missing params, or extra params in the SendToAdmins

Show your public/stock SendToAdmins