Warning 202 - 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: Warning 202 (
/showthread.php?tid=571841)
Warning 202 -
ChuckyBabe - 22.04.2015
Today i got warnings from my gamemodes.
Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\replace\Irish Verse\gamemodes\IVRP.pwn(39670) : warning 202: number of arguments does not match definition
C:\Users\Windows7\Desktop\Microsoft Corporation ©\replace\Irish Verse\gamemodes\IVRP.pwn(39670) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
My stock
Код:
stock SendClientMessageEx(playerid, color, string[])
{
if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
return 0;
else SendClientMessage(playerid, color, string);
return 1;
}
That line and that code.
Код:
CMD:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid/partofname] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] < PlayerInfo[playerid][pAdmin]) {
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "AdmCmd: %s (IP:%s) was kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason);
Log("logs/kick.log", string);
format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have been kicked by %s, reason: %s. Take a screenshot using F8 if you find this abusive.", GetPlayerNameEx(playerid), reason);
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
}
return 1;
} else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
return 1;
}
*The red colored text represents the line where the error is. +1 REP!
Re: Warning 202 -
ChuckyBabe - 22.04.2015
Solved. I solved it by this way.
I change
Код:
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have been kicked by %s, reason: %s. Take a screenshot using F8 if you find this abusive.", GetPlayerNameEx(playerid), reason);
To
Код:
format(string, sizeof(string), "You have been kicked by %s, reason: %s. Take a screenshot using F8 if you find this abusive.", GetPlayerNameEx(playerid), reason);
SendClientMessageEx(giveplayerid,COLOR_LIGHTBLUE, string);
Re: Warning 202 -
Crayder - 23.04.2015
You could get Slice's strlib. Then you could do it almost exactly like you tried before failing.
Код:
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, sprintf("You have been kicked by %s, reason: %s. Take a screenshot using F8 if you find this abusive.", GetPlayerNameEx(playerid), reason));