stock strreplace(string[], find, replace)
{
for(new i=0; string[i]; i++)
{
if(string[i] == find)
{
string[i] = replace;
}
}
}
stock GetName(playerid)
{
new
name[24];
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, "_", " ");
return name;
}
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(310) : error 035: argument type mismatch (argument 2)
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(310) : error 035: argument type mismatch (argument 2)
stock GetName(playerid)
{
new szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
return szName;
}
stock strreplace(string[], find, replace)
{
for(new i=0; string[i]; i++)
{
if(string[i] == find)
{
string[i] = replace;
}
}
}
stock GetName(playerid)
{
new
name[24];
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, "_", " ");
return name;
}
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(313) : error 021: symbol already defined: "GetName" C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(317) : error 035: argument type mismatch (argument 2)
strreplace(name, _, );
|
For one, you can't have two stocks named the exact same thing...
and then for your strreplace stock you have find and replace set as normal variables, they need to be strings. |