SA-MP Forums Archive
Warnings arguments - 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)
+--- Thread: Warnings arguments (/showthread.php?tid=582946)



Warnings arguments - IndependentGaming - 24.07.2015

Hello, i made new command but im getting this warnings:

PHP код:
C:\Users\Koen\Desktop\SGRP\gamemodes\SGRP.pwn(54621) : warning 202number of arguments does not match definition 
PHP код:
case 1:
                {
                    
playerData[giveplayerid][pLevel] = amount;
                    
format(stringsizeof string"AdmWarn: {FFFFFF}%s Has set %s level to  %d."getPlayerName(playerid), getPlayerName(playerid), amount);
>>                    
SendHeadStaffMessage(COLOR_LIGHTREDstring5);
                    
format(stringsizeof(string), "   %s's Level has been set to %d."getPlayerName(giveplayerid), amount);
                    
SetPlayerScore(giveplayeridplayerData[giveplayerid][pLevel]);
                } 



Re: Warnings arguments - IndependentGaming - 24.07.2015

anyone ?


Re: Warnings arguments - StuartD - 24.07.2015

Show us the SendHeadStaffMessage code.

EDIT also looks like you missed the brackets on sizeof(string)


Re: Warnings arguments - IndependentGaming - 24.07.2015

PHP код:
forward SendHeadStaffMessage(colorstring[]);
public 
SendHeadStaffMessage(colorstring[])
{
    foreach(
Playeri)
    {
            if(
playerData[i][pAdmin] >= 6)
            {
                
SendClientMessage(icolorstring);
            }
    }




Re: Warnings arguments - SoFahim - 24.07.2015

PHP код:
 SendHeadStaffMessage(COLOR_LIGHTREDstring5); 
Show us SendHeadStaffMassage codes


Re: Warnings arguments - IndependentGaming - 24.07.2015

look up


Re : Warnings arguments - Terrorizt - 24.07.2015

SendHeadStaffMessage has only 2 parameters but you wrote it with 3 you added that 5


Re: Warnings arguments - SickAttack - 24.07.2015

Quote:
Originally Posted by StuartD
Посмотреть сообщение
Show us the SendHeadStaffMessage code.

EDIT also looks like you missed the brackets on sizeof(string)
You can do it like that too.

Replace it with:
pawn Код:
SendHeadStaffMessage(COLOR_LIGHTRED, string);