IRC stuff, Could someone tell me why this isnt working please?
#1

I've got two errors when compiling this, im now sure why...

Could someone tell me what the problem is?

pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(pm == true)
    {
        new ircLevel[4];
        new userslist[128];
        new pmstr[128];
        ircGetUserList(RandomBot(), ECHOCHAN, userslist, sizeof(userslist));
        new spaces = CountSpaces(userslist);
        new users[spaces][30]; // LINE WITH ERRORS (1163)
        ircGetUserLevel(RandomBot(), ECHOCHAN, userslist, ircLevel);
        if(!strcmp(ircLevel, "~", true,1) || !strcmp(ircLevel, "&", true,1) || !strcmp(ircLevel, "@", true,1) || !strcmp(ircLevel, "%", true,1)) return true;
    format(pmstr,128,"5PM from %s (ID:%d) to %s (ID:%d):12 %s",PlayerName(playerid),playerid,PlayerName(recieverid),recieverid,text);
        explain(pmstr);
    }
    return true;
}
Код:
(1163) : error 008: must be a constant expression; assumed zero
(1163) : error 036: empty statement
Reply
#2

pawn Код:
new users[30][spaces]; // LINE WITH ERRORS (1163)
Reply
#3

That gave me two different errors and a warning.

Код:
(1163) : error 008: must be a constant expression; assumed zero
(1163) : error 009: invalid array size (negative, zero or out of bounds)
(1163) : warning 204: symbol is assigned a value that is never used: "users"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)