must be a constant expression; assumed zero
#1

I've tried to hide IP's that are being mentioned ingame to prevent advertising,
Wrote a little code for it, however its returning the error
Код:
error 008 : must be a constant expression; assumed zero
Its on the following piece of code.
Код:
public OnPlayerText(playerid, text[])
{

	new result[128] = text;
    for(new i = 0, j = strlen(result); i < j; i++)
    {
        if('0' <= result[i] <= '9')
        {
            result[i] = '*';
        }
    }

    SendPlayerMessageToAll(playerid, result);
return 0;
}
The error is on the line where im making the variable :: new result[128] = text;
Reply


Messages In This Thread
must be a constant expression; assumed zero - by yvoms - 11.09.2016, 11:44
Re: must be a constant expression; assumed zero - by Shinja - 11.09.2016, 11:54
Re: must be a constant expression; assumed zero - by yvoms - 11.09.2016, 12:00
Re: must be a constant expression; assumed zero - by PrO.GameR - 11.09.2016, 12:04
Re: must be a constant expression; assumed zero - by yvoms - 11.09.2016, 12:07
Re: must be a constant expression; assumed zero - by Vince - 11.09.2016, 12:25
Re: must be a constant expression; assumed zero - by yvoms - 11.09.2016, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)