PDA

View Full Version : number of arguments does not match definition


lilt074life
29/05/2013, 11:39 AM
Hello when I try to compile I get this errors:

C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\rlgrp.pwn(48952) : warning 202: number of arguments does not match definition
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\rlgrp.pwn(48952) : warning 202: number of arguments does not match definition
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\rlgrp.pwn(48952) : warning 202: number of arguments does not match definition


I got in this line:

KickWithMessage2(giveplayerid, COLOR_LIGHTRED, "AdmCmd: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));


and the KickWithMessage2 stock is:

stock KickWithMessage2(playerid, color, message[])
{
SendClientMessageToAll(color, message);
SetTimerEx("KickPublic2", 1000, 0, "d", playerid);
}

Konewka
29/05/2013, 11:45 AM
You used arguments in KickWithMessage2 that are not defined in your stock. In order to insert a formated string use format function.


new string[103];
format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));

KickWithMessage2(giveplayerid, COLOR_LIGHTRED, string);

lilt074life
29/05/2013, 11:49 AM
thx bro