SA-MP Forums Archive
Forward error[Urgent REP+] - 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: Forward error[Urgent REP+] (/showthread.php?tid=373233)



Forward error[Urgent REP+] - Strech - 29.08.2012

I have this forward in my GM
forward EndLotto(second);
and i get this error

error 029: invalid expression, assumed zero


Re: Forward error[Urgent REP+] - Akira297 - 29.08.2012

Can we see the line using,

[ pawn ] [ /pawn ] ?


Re: Forward error[Urgent REP+] - Strech - 29.08.2012

pawn Код:
forward EndLotto(second);
The forward is the actual line.


Re: Forward error[Urgent REP+] - Misiur - 29.08.2012

Show few lines more in both directions.


Re: Forward error[Urgent REP+] - Strech - 29.08.2012

pawn Код:
public EndLotto(second)
{
    new string[128];
    if(second != 0)
    {
        format(string, sizeof(string), "Lottery News Countdown: %d.", second);
        OOCOff(COLOR_WHITE, string);
        SetTimerEx("EndLotto", 1000, 0, "d", second-1);
    }
    else
    {
        format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
        OOCOff(COLOR_WHITE, string);
        new rand = random(99);
        if(rand < 77) { rand += 3; }
        Lotto(rand);
        LottoStarted = 0;
    }
    return 1;
}
Thats the Public,it might halp.


Re: Forward error[Urgent REP+] - Misiur - 29.08.2012

Come back when you learn to read, m'kay? The problem lies probably somewhere before forward line


Re: Forward error[Urgent REP+] - Strech - 29.08.2012

pawn Код:
/* Forwards (TODO: Convert to Naked or Move right above function.) */
Thats on the upper part of EndLotto.And thats Under it
pawn Код:
forward PrepareLotto();
In One
pawn Код:
/* Forwards (TODO: Convert to Naked or Move right above function.) */
forward EndLotto(second);
forward PrepareLotto();



Re: Forward error[Urgent REP+] - Misiur - 29.08.2012

We need to go higher.


Re: Forward error[Urgent REP+] - Strech - 29.08.2012

pawn Код:
#define COLOR_HELPERCHAT  0x0BBD5FEC8
#define COLOR_REPORT 0xFFFF91FF
#define COLOR_SHOP 0xE7E784FF
#define ResetMoneyBar ResetPlayerMoney
#define UpdateMoneyBar GivePlayerMoney

// strcpy - Simon / ******
#define strcpy(%0,%1,%2) \
    strcat((%0[0] = '\0', %0), %1, %2)


#define SendFormattedMessage(%0,%1,%2) do{new _str[128]; format(_str,128,%2); SendClientMessageEx(%0,%1,_str);}while(FALSE)

/* Forwards (TODO: Convert to Naked or Move right above function.) */
forward EndLotto(second);
forward PrepareLotto();
Thats a bit higher.


Re: Forward error[Urgent REP+] - Misiur - 29.08.2012

Ok, I was wrong, defines can't cause this. If you comment that line, does the error occur on PrepareLotto line instead?