help with (GiveTeamsScore)
#1

hi guys how can i fix that

Код:
stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
{
  if(CPiD == CPS1)
	{
	    GameTextForPlayer(playerid, "Stay her to capture hospital!", 3000, 3);
		if(gTeam[playerid]==TEAM_Latino)
		{
		GangZoneShowForAll(Hospital,0x00F3FFAF);
	    SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
        GivePlayerMoney(playerid,6000);
        SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        GiveTeamScore(gTeam[playerid]=TEAM_Latino, 1);
        SendTeamMessage(COLOR_0xFFFFFFFF, "You received 1 Score For a Capture!"
		}
		if(gTeam[playerid]==TEAM_USA)
		{
		GangZoneShowForAll(Hospital,0x1400C3FF);
		}
  }
  return 1;
}

Код:
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(73) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(74) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(154) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(290) : error 017: undefined symbol "GiveTeamScore"
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(291) : error 017: undefined symbol "SendTeamMessage"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

GiveTeamScore & SendTeamMessage are your custom function's! You need to define them.
Reply
#3

Код:
stock GiveTeamScore(teamid, score)
{
	for(new i; i < MAX_PLAYERS; i++)
	{
		if(Team[i] = teamid)
		{
			SetPlayerScore(i, GetPlayerScore(i) + score);
		}
	}
}
Change the team var. Add this to the bottom of your GM.
Reply
#4

thx dude but

Код:
stock GiveTeamScore(teamid, score)
{
	for(new i; i < MAX_PLAYERS; i++)
	{
		if(Team[i] = teamid)
		{
			SetPlayerScore(i, GetPlayerScore(i) + score);
		}
	}
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
  if(PlayerCP[playerid] != -1) return OnPlayerEnterStreamedCheckpoint(playerid, PlayerCP[playerid]);
  return 1;
}

stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
{
  if(CPiD == CPS1)
	{
	    GameTextForPlayer(playerid, "Stay her to capture hospital!", 3000, 3);
		if(gTeam[playerid]==TEAM_Latino)
		{
		GangZoneShowForAll(Hospital,0x00F3FFAF);
	    SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
        GivePlayerMoney(playerid,6000);
        SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        GiveTeamScore(gTeam[playerid]=TEAM_EUROPE, 1);

 		}
Quote:

D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(73) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(74) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(215) : warning 217: loose indentation
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(333) : error 017: undefined symbol "Team"
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(333) : warning 215: expression has no effect
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(333) : error 001: expected token: ";", but found "]"
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(333) : error 029: invalid expression, assumed zero
D:\OFSERV~1\MYSERV~1\GAMEMO~1\sor9a.pwn(333) : fatal error 107: too many error messages on one line

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


4 Errors.

im suck
Reply
#5

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Change the team var
What's so hard to understand about it?
Reply
#6

Quote:
Originally Posted by Snipa
Посмотреть сообщение
What's so hard to understand about it?
For some it is so hard lol :S Relax mate!
pawn Код:
stock GiveTeamScore(teamid, score) // Try this code
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(gTeam[i] = teamid)
        {
            SetPlayerScore(i, GetPlayerScore(i) + score);
        }
    }
}
Reply
#7

dude i do that but nothing chage
Reply
#8

Quote:
Originally Posted by BlacKxStory
Посмотреть сообщение
dude i do that but nothing chage
Tell us one thing! Whats your team var? i Mean how have u defined teams?
Reply
#9

thx all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)