SA-MP Forums Archive
some help - 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: some help (/showthread.php?tid=313345)



some help - 22Jack - 25.01.2012

pawn Код:
C:\Documents and Settings\Gabriel\Desktop\TC\gamemodes\Brazilian.pwn(320) : error 018: initialization data exceeds declared size
pawn Код:
new PlayerLastPos[MAX_PLAYERS][pPos],
PlayerAfkTicks[MAX_PLAYERS],
Float:PlayerCurrentPos[3];
new MSGs[1][256] = {
"» Bem vindo de volta", //320

};



Re: some help - Konstantinos - 25.01.2012

I understand the mistake. You have only one message on the MSGs and you are using random from MSGs while you have only one.
pawn Код:
new MSGs[1][256] = {
"» Bem vindo de volta", //320
// NOTE: Also if it's the last, it should have no ","
// ANOTHER NOTE: 128 is enough
};
pawn Код:
forward RandomMSGs();
public RandomMSGs()
{
    new string[256];
    new random1 = random(sizeof(MSGs));
    new random2 = random(sizeof(COLORS));
    format(string, sizeof(string), "%s", MSGs[random1]);
    SendClientMessageToAll(COLORS[random2],string);
    return 1;
}



Re: some help - 22Jack - 25.01.2012

thanksssss so mutch


Re: some help - Konstantinos - 25.01.2012

Your Welcome Jack.