SA-MP Forums Archive
4 wired errors:/ - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 4 wired errors:/ (/showthread.php?tid=115422)



4 wired errors:/ - pawelf94 - 23.12.2009

pawn Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(1871) : error 017: undefined symbol "Team"
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(1871) : warning 215: expression has no effect
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(1871) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(1871) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(1871) : fatal error 107: too many error messages on one line
4 errors why?

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(ONWG[playerid]==1)
    {
      if(Team[killerid] == army)     // 1871
      {
        if(Team[playerid] == terr)  
        {
                yellowscore++;
                SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
            }
            else if(Team[playerid] == army)
            {
                GameTextForPlayer(killerid, "Friendly Fire Will Not Be Tolerated", 3000, 4);
                GivePlayerMoney(killerid, -5000);
                SetPlayerHealth(killerid, 0.0);
                SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
            }
      }
      if(Team[killerid] == terr)
      {
        if(Team[playerid] == army)
        {
                bluescore++;
                SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
            }
            else if(Team[playerid] == terr)
            {
                GameTextForPlayer(killerid, "Friendly Fire Will Not Be Tolerated", 3000, 4);
                GivePlayerMoney(killerid, -100);
                SetPlayerHealth(killerid, 0.0);
                SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
            }
      }
    }
...



Re: 4 wired errors:/ - Anthony_Brassi - 24.12.2009

Tell us what line is 1871..


EDIT: nvm...lol


Re: 4 wired errors:/ - pawelf94 - 24.12.2009

Код:
	  if(Team[killerid] == army)     // 1871



Re: 4 wired errors:/ - LarzI - 24.12.2009

Have you defined the Team variable as this?
pawn Код:
new Team[MAX_PLAYERS];



Re: 4 wired errors:/ - pawelf94 - 24.12.2009

now i get this

pawn Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(988) : error 006: must be assigned to an array
this is the line:

pawn Код:
Team[playerid] = police;



Re: 4 wired errors:/ - pliva_sb - 24.12.2009

Quote:
Originally Posted by pawelf94
now i get this

pawn Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.pwn(988) : error 006: must be assigned to an array
this is the line:

pawn Код:
Team[playerid] = police;
new Team[MAX_PLAYERS];


Re: 4 wired errors:/ - pawelf94 - 24.12.2009

i have this:

pawn Код:
new Team[MAX_PLAYERS];
new hick[MAX_PLAYERS];
new police[MAX_PLAYERS];

new hickscore;
new policescore;

new Text:Score;



Re: 4 wired errors:/ - LarzI - 24.12.2009

If 'hick' and 'police' are teams, I suggest defining them to values (from 0 >)
Example:
pawn Код:
#define police      (0)
#define hick        (1)

new Team[ MAX_PLAYERS ];
Then in checks do:
pawn Код:
if( Team[ playerid ] == police ) //if team is equal to police (0)
{
    //do something
}
else if( Team[ playerid ] == hick ) //if team is equal to hick (1)
{
    //do something else
}



Re: 4 wired errors:/ - pawelf94 - 24.12.2009

I ONLY GET ERROR ON THIS LINE NOW

pawn Код:
KillTimer(playerid, ScoreUpdate);
[PAWN]C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm2.p wn(1895) : error 076: syntax error in the expression, or invalid function call[PAWN]


Re: 4 wired errors:/ - LarzI - 24.12.2009

Do you even know what KillTimer does?