#1

Код:
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(73) : error 017: undefined symbol "SetPlayerToTeamColor"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001: expected token: ";", but found "if"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 017: undefined symbol "gTeam"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : fatal error 107: too many error messages on one line

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


5 Errors.

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColor(playerid)
  if (gTeam[playerid] == TEAM_GROVE)
  {
		SetPlayerColor(playerid, TEAM_GROVE_COLOR);
	}
	else if (gTeam[playerid] == TEAM_BALLA)
	{
		SetPlayerColor(playerid, TEAM_BALLA_COLOR);
	}
	return 1;
}
Reply
#2

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
Код:
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(73) : error 017: undefined symbol "SetPlayerToTeamColor"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001: expected token: ";", but found "if"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 017: undefined symbol "gTeam"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : fatal error 107: too many error messages on one line

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


5 Errors.

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColor(playerid)
  if (gTeam[playerid] == TEAM_GROVE)
  {
		SetPlayerColor(playerid, TEAM_GROVE_COLOR);
	}
	else if (gTeam[playerid] == TEAM_BALLA)
	{
		SetPlayerColor(playerid, TEAM_BALLA_COLOR);
	}
	return 1;
}
PHP код:
public OnPlayerSpawn(playerid)
{
  
SetPlayerToTeamColor(playerid);
  if (
gTeam[playerid] == TEAM_GROVE)
  {
        
SetPlayerColor(playeridTEAM_GROVE_COLOR);
    }
    else if (
gTeam[playerid] == TEAM_BALLA)
    {
        
SetPlayerColor(playeridTEAM_BALLA_COLOR);
    }
    return 
1;

Reply
#3

still
PHP код:
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(73) : error 017undefined symbol "SetPlayerToTeamColor"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 017undefined symbol "gTeam"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : warning 215expression has no effect
C
:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001expected token";"but found "]"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 029invalid expressionassumed zero
C
:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors

Reply
#4

You need to make the "SetPlayerToTeamColor(playerid)" callback

Код:
forward SetPlayerToTeamColor(playerid)
public SetPlayerToTeamColor(playerid)
{
	if(gTeam[playerid] == TEAM_GROVE)
	{
	    SetPlayerColor(playerid, TEAM_GROVE_COLOR;
	}
	if(gTeam[playerid] == TEAM_BALLA)
	{
	    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
	}
	return 1;
}
Something like that, edit it to your desire.

EDIT: Editted it to suit you better
Reply
#5

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
still
PHP код:
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(73) : error 017undefined symbol "SetPlayerToTeamColor"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 017undefined symbol "gTeam"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : warning 215expression has no effect
C
:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001expected token";"but found "]"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 029invalid expressionassumed zero
C
:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors

This feature SetPlayerToTeamColor(playerid); is not standard, you have it in gamemode?
Reply
#6

LIKE THIS??[
Код:
public OnPlayerSpawn(playerid)
{
  forward SetPlayerToTeamColor(playerid)
  if (gTeam[playerid] == TEAM_GROVE)
  {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
LIKE THIS??[
Код:
public OnPlayerSpawn(playerid)
{
  forward SetPlayerToTeamColor(playerid)
  if (gTeam[playerid] == TEAM_GROVE)
  {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    return 1;
}
You should better study
https://sampwiki.blast.hk/wiki/Scripting_Basics
Reply
#8

Replace
Код:
public OnPlayerSpawn(playerid)
{
  forward SetPlayerToTeamColor(playerid)
  if (gTeam[playerid] == TEAM_GROVE)
  {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    return 1;
}
With
Код:
forward SetPlayerToTeamColor(playerid)
public SetPlayerToTeamColor(playerid)
{
	if(gTeam[playerid] == TEAM_GROVE)
	{
	    SetPlayerColor(playerid, TEAM_GROVE_COLOR);
	}
	if(gTeam[playerid] == TEAM_BALLA)
	{
	    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
	}
	return 1;
}
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColor(playerid);
  return 1;
}
Reply
#9

WHAT DO YOU MEAN BY STANDARD
AND GAZZY
Still
errors
Код:
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(72) : error 001: expected token: ";", but found "public"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 017: undefined symbol "gTeam"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\gamemodes\working.pwn(74) : fatal error 107: too many error messages on one line

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


5 Errors.
Im learning to make death Match from https://sampwiki.blast.hk/wiki/PAWN_tutorial
Reply
#10

My bad, replace
Код:
forward SetPlayerToTeamColor(playerid)
with

Код:
forward SetPlayerToTeamColor(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)