Little Help Please.
#1

the error
Код:
error 035: argument type mismatch (argument 2)
the code.
Код:
stock GetName(playerid)
{
    new
        name[24];
    GetPlayerName(playerid, name, sizeof(name));
    strreplace(name, '_', ' ');
    return name;
}
this is were the error is coming from
Код:
 strreplace(name, '_', ' ');
Reply
#2

its obvious that the second parameter type is mismatch, my first guess is that the "strreplace" function that you're using takes 3 strings as parameters, which in this case you're passing one string and two characters hence the "type mismatch" error, so u simply have to replace character parameters with strings,
in other words, change all the ' to "
Reply
#3

change
pawn Код:
strreplace(name, '_', ' ');
to

pawn Код:
strreplace(name, "_", " ");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)