Multiple parameters with a single stock function
#7

Okay, so this is the new function:

pawn Код:
stock SendAdminMessage(string[], .level = 0, .color = COLOR_LIGHTBLUE)
{
    foreach(Player, i)
    {
        if(pInfo[i][pAdminLevel] > 0)
            if(pInfo[i][pAdminLevel] > level) SendClientMessage(i, color, string);
    }
}
I am executing the following function:

pawn Код:
SendAdminMessage(string, .level=4);
This is what the compiler returns:

Код:
C:\Users\Piccoli\Desktop\samp03\gamemodes\RC.pwn(341) : error 017: undefined symbol "level"
C:\Users\Piccoli\Desktop\samp03\gamemodes\RC.pwn(341) : warning 215: expression has no effect
C:\Users\Piccoli\Desktop\samp03\gamemodes\RC.pwn(341) : error 001: expected token: ";", but found ")"
C:\Users\Piccoli\Desktop\samp03\gamemodes\RC.pwn(341) : error 029: invalid expression, assumed zero
C:\Users\Piccoli\Desktop\samp03\gamemodes\RC.pwn(341) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)