Stupid warning occuring!
#1

Hey folks, a simple and a plain thread for now.

Here's the warning showing up:

Код:
(18143) : warning 202: number of arguments does not match definition
The line 18143 is:

pawn Код:
GetPlayerNameEx(playerid, sendername, sizeof(sendername));
The function GetPlayerNameEx is:

pawn Код:
stock GetPlayerNameEx(playerid)
{
    new name[MAX_PLAYER_NAME];
new string[64];
GetPlayerName(playerid,name,sizeof(name));
name[strfind(name,"_")] = ' ';
return name;
}
Main function of the GetPlayerNameEx is to delete the _ character between roleplay names. Every line I use the GetPlayerNameEx function, it keeps occuring, So in total I got 46 warnings. Any help?
Reply
#2

Two arguments too much. It is just "GetPlayerNameEx(playerid);", not with sendername and the sizeof(sendername);
Reply
#3

Your function gets called with 3 arguments ("playerid", "sendername" and "sizeof(sendername)"):
Код:
GetPlayerNameEx(playerid, sendername, sizeof(sendername));
While your function only accepts one argument ("playerid"):
Код:
stock GetPlayerNameEx(playerid)
Reply
#4

It starts not working when I change GetPlayerNameEx(playerid, sendername, sizeof(sendername)); to GetPlayerNameEx(playerid); It gives me an empty space.
Reply
#5

We need more information. Give us a bigger cut of the script. Are you using it for a part of an sentance? (Client Message), or for something else?
Reply
#6

its the standard LARP which im just editing for my own fun.. It sends for ex the /ooc command within GetPlayerNameEx. GetPlayerName is replaced with GetPlayerNameEx. As simple as that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)