SA-MP Forums Archive
4 errors?? +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: 4 errors?? +REP (/showthread.php?tid=341019)



4 errors?? +REP - jordyvc - 09.05.2012

Hey,

I got 4 errors:
Код:
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81 -- 82) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81 -- 82) : fatal error 107: too many error messages on one line

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


4 Errors.
Code:

Код:
stock GetTeamZoneColor(teamid)
{
    switch(teamid)
    {
        case TEAM_REBEL: return 0x00FF0088,
        case TEAM_ARMY: return 0xFF00FF88,
        case TEAM_CIVILIAN: return 0xFFFF0088
    }
    return -1;
}



Re: 4 errors?? +REP - HDFord - 09.05.2012

You forgot a ","
pawn Код:
stock GetTeamZoneColor(teamid)
{
    switch(teamid)
    {
        case TEAM_REBEL: return 0x00FF0088,
        case TEAM_ARMY: return 0xFF00FF88,
        case TEAM_CIVILIAN: return 0xFFFF0088,
    }
    return -1;
}



Re: 4 errors?? +REP - jordyvc - 09.05.2012

I get still the same error's..


Re: 4 errors?? +REP - Jeffry - 09.05.2012

pawn Код:
stock GetTeamZoneColor(teamid)
{
    switch(teamid)
    {
        case TEAM_REBEL: return 0x00FF0088;
        case TEAM_ARMY: return 0xFF00FF88;
        case TEAM_CIVILIAN: return 0xFFFF0088;
    }
    return -1;
}
It's the ; not the ,

Cheers!


Re: 4 errors?? +REP - HDFord - 09.05.2012

Of some reason it complied fine for me with "," but i tought it was ";" when i first saw it.


Re: 4 errors?? +REP - Jeffry - 09.05.2012

Quote:
Originally Posted by HDFord
Посмотреть сообщение
Of some reason it complied fine for me with "," but i tought it was ";" when i first saw it.
The compiler only checks the stock functions for errors if you actually placed them in a public funtion, else they can contain errors, because they are never used.


Re: 4 errors?? +REP - jordyvc - 09.05.2012

Код:
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(81) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(82) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(82) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(83) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jordy van camp\Bureaublad\samp03dsvr_R2_win32\gamemodes\cwrp.pwn(83) : error 008: must be a constant expression; assumed zero



Re: 4 errors?? +REP - HDFord - 09.05.2012

Try to make it in public!
pawn Код:
forward GetTeamZoneColor(teamid);
public GetTeamZoneColor(teamid)
{
    switch(teamid)
    {
        case TEAM_REBEL: return 0x00FF0088;
        case TEAM_ARMY: return 0xFF00FF88;
        case TEAM_CIVILIAN: return 0xFFFF0088;
    }
    return -1;
}



Re: 4 errors?? +REP - Ballu Miaa - 09.05.2012

Try this once.
pawn Код:
stock GetTeamZoneColor(teamid)
{
    switch(teamid)
    {
        case TEAM_REBEL: return 0x00FF0088;
        case TEAM_ARMY: return 0xFF00FF88;
        case TEAM_CIVILIAN: return 0xFFFF0088;
    }
}



Re: 4 errors?? +REP - jordyvc - 09.05.2012

Again 6 error's ??