[HELP] warning 202: number of arguments does not match definition - 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: [HELP] warning 202: number of arguments does not match definition (
/showthread.php?tid=615602)
[HELP] warning 202: number of arguments does not match definition -
Hapukoorepakk - 24.08.2016
Код:
12532: COMMAND:(playerid, params[])
12533: {
12534: new string[256];
12535: format(string, sizeof(string),"%s",GetPlayerName(playerid));
12536: SendClientMessage(playerid, 0x00FFFFFF, string);
12537: return 1;
12538: }
Код:
18381: {
18382: if(dialogid == DIALOG)
18383: {
18384: if(response)
18385: {
18386: new string[256];
18387: format(string, sizeof(string),"%s",GetPlayerName(playerid));
18388: SendClientMessage(playerid, 0x00FFFFFF, string);
18389: }
18390: }
Код:
C:\Users\Alvar\Desktop\Serverid\Eesti Hard Truck v2.0\gamemodes\EestiHardTruck.pwn(12535) : warning 202: number of arguments does not match definition
C:\Users\Alvar\Desktop\Serverid\Eesti Hard Truck v2.0\gamemodes\EestiHardTruck.pwn(12535) : warning 202: number of arguments does not match definition
C:\Users\Alvar\Desktop\Serverid\Eesti Hard Truck v2.0\gamemodes\EestiHardTruck.pwn(18389) : warning 202: number of arguments does not match definition
C:\Users\Alvar\Desktop\Serverid\Eesti Hard Truck v2.0\gamemodes\EestiHardTruck.pwn(18389) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 7960 bytes
Code size: 676444 bytes
Data size: 38010208 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4246 cells (16984 bytes)
Total requirements:38710996 bytes
4 Warnings.
Re: [HELP] warning 202: number of arguments does not match definition -
SyS - 24.08.2016
https://sampwiki.blast.hk/wiki/GetPlayerName
read the correct usage of this function in above link
you can use this small function too instead of getplayername in that place
PHP код:
GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
Re: [HELP] warning 202: number of arguments does not match definition -
Konstantinos - 24.08.2016
https://sampwiki.blast.hk/wiki/GetPlayerName
GetPlayerName has 3 parameters and it does not return the name directly. You need to store the name to a string (passed by reference).