strreplace
#1

Код:
stock strreplace(string[], find, replace)
{
    for(new i = 0; i < sizeof(string[i]); i++)
    {
        if(string[i] == find)
        {
            string[i] = replace;
        }
    }
}
I get this error at the red line:

Quote:

error 080: unknown symbol, or not a constant symbol (symbol "i")

Reply
#2

pawn Код:
for(new i = 0; i < sizeof(string[i]); i++)
//Nope
for(new i = 0, j = strlen(string); i != j; i++)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)