SA-MP Forums Archive
[HELP] having truble with "stock".. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] having truble with "stock".. (/showthread.php?tid=188279)



[HELP] having truble with "stock".. - FujiNNN - 07.11.2010

i'm having trouble with the stock i've created..

pawn Код:
stock GetPlayerFullName(playerid)
{
    new PlayerFullName[MAX_PLAYER_NAME];
    new nez;
    GetPlayerName(playerid, PlayerFullName, sizeof(PlayerFullName));
    while((nez = strfind(PlayerFullName, "_", true)) != -1) PlayerFullName[nez] = ' ';
    return PlayerFullName;
}
pawn Код:
warning 202: number of arguments does not match definition
please can anybody help me with this?.. thanks..


Re: [HELP] having truble with "stock".. - Retardedwolf - 07.11.2010

pawn Код:
new nez = [ MAX_PLAYER_NAME + 1 ];
Only guessing.


Re: [HELP] having truble with "stock".. - FujiNNN - 07.11.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
pawn Код:
new nez = [ MAX_PLAYER_NAME + 1 ];
Only guessing.
pawn Код:
warning 202: number of arguments does not match definition
... stilll .....


Re: [HELP] having truble with "stock".. - GaGlets(R) - 07.11.2010

Код:
"_", true)))
Edit; Damn.. im sleepy


Re: [HELP] having truble with "stock".. - Th3Angel - 07.11.2010

Whats the line that has the error?...


Re: [HELP] having truble with "stock".. - Miguel - 07.11.2010

pawn Код:
stock GetPlayerFullName(playerid)
{
    new PlayerFullName[MAX_PLAYER_NAME];
    new nez;
    GetPlayerName(playerid, PlayerFullName, sizeof(PlayerFullName));
    while(!PlayerFullName[nez] == '\0')
    {
        if(PlayerFullName[nez] == '_') PlayerFullName[nez] = ' ';
        nez ++;
    }
    return PlayerFullName;
}



Re: [HELP] having truble with "stock".. - Th3Angel - 07.11.2010

Can you post everything inside the error window?


Re: [HELP] having truble with "stock".. - (SF)Noobanatior - 07.11.2010

pawn Код:
stock GetPlayerFullName(playerid)
{
    new PlayerFullName[MAX_PLAYER_NAME];
    new nez;
    GetPlayerName(playerid, PlayerFullName, sizeof(PlayerFullName));
    while((nez = strfind(PlayerFullName, "_", true,0)) != -1) PlayerFullName[nez] = ' ';
    return PlayerFullName;
}
0 after true should be optional be cant see why else its doing it


Re: [HELP] having truble with "stock".. - FujiNNN - 07.11.2010

same....

i've been trying them all..

and about the error rows question..

this is the error i get on every single GetPlayerName row:

pawn Код:
warning 202: number of arguments does not match definition

maybe it's something about the PUBLIC?... stock GetPlayerFullName(playerid) To stock GetPlayerFullName(playerid, ?, ?) ..


Re: [HELP] having truble with "stock".. - WillyP - 07.11.2010

pawn Код:
stock GetPlayerFullName(playerid)
{
    new PlayerFullName[MAX_PLAYER_NAME];
    new nez;
    GetPlayerName(playerid, PlayerFullName, sizeof(PlayerFullName));
    while((nez = strfind(PlayerFullName, "_", true))) != -1) PlayerFullName[nez] = ' ';
    return PlayerFullName;
}