Help with CMD -
arko123 - 09.11.2012
Hey, I recently put a radio CMD into my script and it keeps on saying 'warning 202: number of arguments does not match definition' here is the script:
CMD:radio(playerid, params[])
{
new string[128];
if(isnull(params)) return SendClientMessage(playerid, WHITE, "USAGE: /r(adio) [message]");
new
rank[64];
switch (PlayerVar[playerid][pLSPD])
{
case 1:
{
switch(PlayerVar[playerid][pFactionRank])
{
case 1: rank = "Cadet";
case 2: rank = "Officer";
case 3: rank = "Corporal";
case 4: rank = "Sergeant";
case 5: rank = "Captain";
case 6: rank = "Chief";
default: rank = "Trainee";
}
format(string, sizeof(string), "[Radio] %s %s: %s, over", rank, GetPlayerName(playerid), params);
SendLSPDMessage(LSPD, string);
}
default:
{
SendClientMessage(playerid, WHITE, "You are not in the LSPD");
return 1;
}
}
format(string, sizeof(string), "(RADIO): %s", params);
SetPlayerChatBubble(playerid, string, WHITE, 15.0, 5000);
return 1;
}
It gets the error here: format(string, sizeof(string), "[Radio] %s %s: %s, over", rank, GetPlayerName(playerid), params);
SendLSPDMessage(LSPD, string);
Please help.
Re: Help with CMD -
Team_PRO - 09.11.2012
what is the line 202?
Re: Help with CMD -
arko123 - 09.11.2012
format(string, sizeof(string), "[Radio] %s %s: %s, over", rank, GetPlayerName(playerid), params);
SendLSPDMessage(LSPD, string);
Re: Help with CMD -
Team_PRO - 09.11.2012
Try To change
To
or
Re: Help with CMD -
Glad2BeHere - 09.11.2012
pawn Код:
format(string, sizeof(string), "[Radio] %d %s: %s, over", rank, GetPlayerName(playerid), params);
SendLSPDMessage(LSPD, string);
Re: Help with CMD -
arko123 - 09.11.2012
I got loads more errors when I did that.
Re: Help with CMD -
B-Matt - 09.11.2012
SendLSPDMessage(LSPD, COLOR_WHITE, string); try this
Re: Help with CMD -
arko123 - 09.11.2012
Its only with this code:
Код:
format(string, sizeof(string), "[Radio] %s %s: %s, over", rank, GetPlayerName(playerid), params);
Re: Help with CMD -
Team_PRO - 09.11.2012
Try This
PHP код:
format(string, sizeof(string), "[Radio] %s %s: %s, over", rank, GetPlayerName(playerid, params);
Re: Help with CMD -
Konstantinos - 09.11.2012
Everything is fine except the line "SendLSPDMessage(LSPD, string);".
Can you show us the stock part of it?