SA-MP Forums Archive
help to me - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help to me (/showthread.php?tid=373354)



help to me - POL_george - 30.08.2012




Re: help to me - RedJohn - 30.08.2012

1. You missed one bracket.

2. No 'new string...', if you have it at the beginning then fix first error ^.

3. Instead of 'color' use 0x82BAFFFF, if you have defined colors then fix first error ^^.


Re: help to me - POL_george - 30.08.2012

Is a copy-paste other gm


Re: help to me - POL_george - 30.08.2012

D:\The Godfather\gamemodes\gf.pwn(26169) : error 003: declaration of a local variable must appear in a compound block
D:\The Godfather\gamemodes\gf.pwn(26170) : error 010: invalid function or declaration
D:\The Godfather\gamemodes\gf.pwn(26172) : error 010: invalid function or declaration
D:\The Godfather\gamemodes\gf.pwn(26174) : error 010: invalid function or declaration
D:\The Godfather\gamemodes\gf.pwn(2617 : error 054: unmatched closing brace ("}")
D:\The Godfather\gamemodes\gf.pwn(26181) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.


Re: help to me - clarencecuzz - 30.08.2012

pawn Код:
public HBroadCast(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pAdmin] != 0)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 1;
}
'color' is defined by what he enters in his HBroadCast line. Example HBroadCast(red, "Hello"); or HBroadCast(0xFF0000FF, "Hello");

EDIT: The error is because you used <= MAX_PLAYERS


Re: help to me - C00K13M0N$73R - 30.08.2012

public HBroadCast(...)
[color=red{[/color]This

No string formated