strreplace problem
#1

Code:
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(191) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(192) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(402) : error 025: function heading differs from prototype
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(403) : error 021: symbol already defined: "strreplace"
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(411) : warning 209: function "strreplace" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Code:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname, '_', ' ');/191
    format(str, sizeof(str), "%s says: %s", pname, text);.
    ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return 0;
}
Code:
stock strreplace(string[], find, replace)//402
{//403
    for(new i=0; string[i]; i++)
    {
        if(string[i] == find)
        {
            string[i] = replace;
        }
    }
}//411
how to fix that?
Reply


Messages In This Thread
strreplace problem - by antonio600x - 30.08.2011, 11:58
Re: strreplace problem - by Pinguinn - 30.08.2011, 12:00
Re: strreplace problem - by antonio600x - 30.08.2011, 12:03
Re: strreplace problem - by JaTochNietDan - 30.08.2011, 12:18
Re: strreplace problem - by antonio600x - 30.08.2011, 12:26
Re: strreplace problem - by JaTochNietDan - 30.08.2011, 12:54

Forum Jump:


Users browsing this thread: 2 Guest(s)