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



errors - Glossy42O - 30.07.2015

function "OnPlayerSpawn" is not implemented



what does that mean?


AW: errors - Kaliber - 30.07.2015

Can you show us your code?


Re: errors - Glossy42O - 30.07.2015

PHP код:
public OnPlayerSpawn(playerid)
{
  
SetPlayerToTeamColour(playerid)
  {
    if(
gTeam[playerid] == GANG_GROVE)
    {
       
SetPlayerColor(playeridGANG_GROVE_COLOUR);
    }
    if(
gTeam[playerid] == GANG_BALLAS)
    {
       
SetPlayerColor(playeridGANG_BALLAS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_VAGOS)
    {
       
SetPlayerColor(playeridGANG_VAGOS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_AZTECAS)
    {
       
SetPlayerColor(playeridGANG_AZTECAS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_TRIADS)
    {
       
SetPlayerColor(playeridGANG_TRIADS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_ITALIAN_MAFIA)
    {
       
SetPlayerColor(playeridGANG_ITALIAN_MAFIA_COLOUR);
    }
    return 
1;




Re: errors - PT - 30.07.2015

Do you have the include a_samp included?


Re: errors - MBilal - 30.07.2015

Quote:
Originally Posted by Glossy42O
Посмотреть сообщение
PHP код:
public OnPlayerSpawn(playerid)
{
  
SetPlayerToTeamColour(playerid)
  {
    if(
gTeam[playerid] == GANG_GROVE)
    {
       
SetPlayerColor(playeridGANG_GROVE_COLOUR);
    }
    if(
gTeam[playerid] == GANG_BALLAS)
    {
       
SetPlayerColor(playeridGANG_BALLAS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_VAGOS)
    {
       
SetPlayerColor(playeridGANG_VAGOS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_AZTECAS)
    {
       
SetPlayerColor(playeridGANG_AZTECAS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_TRIADS)
    {
       
SetPlayerColor(playeridGANG_TRIADS_COLOUR);
    }
    if(
gTeam[playerid] == GANG_ITALIAN_MAFIA)
    {
       
SetPlayerColor(playeridGANG_ITALIAN_MAFIA_COLOUR);
    }
    return 
1;

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColour(playerid)
  {
	if(gTeam[playerid] == GANG_GROVE)
	{
	   SetPlayerColor(playerid, GANG_GROVE_COLOUR);
	}
	if(gTeam[playerid] == GANG_BALLAS)
	{
	   SetPlayerColor(playerid, GANG_BALLAS_COLOUR);
	}
	if(gTeam[playerid] == GANG_VAGOS)
	{
	   SetPlayerColor(playerid, GANG_VAGOS_COLOUR);
	}
	if(gTeam[playerid] == GANG_AZTECAS)
	{
	   SetPlayerColor(playerid, GANG_AZTECAS_COLOUR);
	}
	if(gTeam[playerid] == GANG_TRIADS)
	{
	   SetPlayerColor(playerid, GANG_TRIADS_COLOUR);
	}
	if(gTeam[playerid] == GANG_ITALIAN_MAFIA)
	{
	   SetPlayerColor(playerid, GANG_ITALIAN_MAFIA_COLOUR);
	}
    return 1;
}
   return 1;
}



Re: errors - Variable™ - 30.07.2015

Removed.


Re: errors - Glossy42O - 30.07.2015

Quote:
Originally Posted by PT
Посмотреть сообщение
Do you have the include a_samp included?
yep.


Re: errors - Variable™ - 30.07.2015

Removed.


Re: errors - dominik523 - 30.07.2015

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColour(playerid)
  {
    if(gTeam[playerid] == GANG_GROVE)
    {
       SetPlayerColor(playerid, GANG_GROVE_COLOUR);
    }
    if(gTeam[playerid] == GANG_BALLAS)
    {
       SetPlayerColor(playerid, GANG_BALLAS_COLOUR);
    }
    if(gTeam[playerid] == GANG_VAGOS)
    {
       SetPlayerColor(playerid, GANG_VAGOS_COLOUR);
    }
    if(gTeam[playerid] == GANG_AZTECAS)
    {
       SetPlayerColor(playerid, GANG_AZTECAS_COLOUR);
    }
    if(gTeam[playerid] == GANG_TRIADS)
    {
       SetPlayerColor(playerid, GANG_TRIADS_COLOUR);
    }
    if(gTeam[playerid] == GANG_ITALIAN_MAFIA)
    {
       SetPlayerColor(playerid, GANG_ITALIAN_MAFIA_COLOUR);
    }
    return 1;
}
Seems to me like you have one bracket more that you should have.


Re: errors - Glossy42O - 30.07.2015

C:\Users\yan\Desktop\LS-GW\gamemodes\kkk.pwn(206) : warning 225: unreachable code
C:\Users\yan\Desktop\LS-GW\gamemodes\kkk.pwn(206) : warning 217: loose indentation
C:\Users\yan\Desktop\LS-GW\gamemodes\kkk.pwn(206) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\LS-GW\gamemodes\kkk.pwn(206) : error 004: function "OnPlayerSpawn" is not implemented
C:\Users\yan\Desktop\LS-GW\gamemodes\kkk.pwn(20 : error 017: undefined symbol "SetPlayerToTeamColour"