[HELP] warning 202: number of arguments does not match definition
#1

Код:
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.
Reply
#2

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(playeridnamesizeof(name));
 return 
name;

Reply
#3

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)