Two warnings: nr of arguments does not match definition
#1

error:
Код:
C:\Users\Mijn pc\Desktop\A\gamemodes\new.pwn(8620) : warning 202: number of arguments does not match definition
C:\Users\Mijn pc\Desktop\A\gamemodes\new.pwn(8620) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
line:
Код:
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just respawned all unused cars.", GetPlayerName(playerid));
How can I solve this?
Reply
#2

show the above code as well
Reply
#3

GetPlayerName takes 3 parameters not only 1, so this part is wrong:
pawn Код:
GetPlayerName(playerid)
Here's your code fixed (Explained in comments):
pawn Код:
new name[MAX_PLAYER_NAME]; // declaring a new string to store the player's name in
GetPlayerName(playerid, name, sizeof(name)); // gets the player name then stores it into the string we declared
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just respawned all unused cars.", name); // here you can use "name"
Reply
#4

Thanks both of you, solved. - repped you HellSphinX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)