error 035: argument type mismatch
#1

C:\Users\Chelsea\Desktop\iwrp\iwrp.pwn(613) : error 035: argument type mismatch (argument 3)

pawn Код:
stock NameL(playerid)
{
    //new pName[MAX_PLAYER_NAME];
    new name[MAX_PLAYER_NAME];

    GetPlayerName(playerid, "CharUsername",name ,MAX_PLAYER_NAME);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
Reply
#2

Код:
GetPlayerName(playerid, "CharUsername",name ,MAX_PLAYER_NAME);
It must be 3 arguments.
mean it must be
Код:
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
Reply
#3

mate im using WCRP script so if i remove CharUsernam it will show the accountname not the charactername
Reply
#4

And all of use here are familiar with each and every script ever released on this forum ... Is GetPlayerName overloaded or not?
Reply
#5

C:\Users\Chelsea\Desktop\iwrp\iwrp.pwn(613) : error 035: argument type mismatch (argument 3)
Lines: 308 to 319
pawn Код:
stock NameL(playerid)
{
    //new pName[MAX_PLAYER_NAME];
    new name[MAX_PLAYER_NAME];

    GetPlayerName(playerid, "CharUsername",name,MAX_PLAYER_NAME);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
pawn Код:
stock NameL(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, "CharUsername",name ,MAX_PLAYER_NAME);
    //GetPlayerName(playerid, "CharUsername",name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
Tried to do this and its not working
Reply
#6

This is working perfectly...
PHP код:
main()
{
    new 
name[] = "Jina_Sawyers";
    for(new 
isizeof(name); i++)
    {
        if(
name[i] == '_')
            
name[i] = ' ';
    }
    
printf("%s"name);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)