OnPlayerConnect Error/Warning?
#1

Hi, for some reason I am having a problem with this script, can anyone help:

Код:
public OnPlayerConnect(playerid)
{
        new name[MAX_PLAYER_NAME], string[44];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "[SERVER]: %s has joined the server.",name);
        SendClientMessageToAll(0xFFFFFFFF, string);
	SendClientMessage(playerid, 0xFFFF00AA, "Welcome to ~~~~~~~~~~~~~~~~~~~~~~~~~.");
	SendClientMessage(playerid, 0xAA3333AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
	SendClientMessage(playerid, 0xAA3333AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...");
	SendClientMessage(playerid, 0xAFAFAFAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
	GameTextForPlayer(playerid,"Welcome to ~~~~, By ~~~~",5000,1);
	return 1;
}
    SetPlayerTeamColor(playerid)
    {
        if (gTeam[playerid] == TEAM_ArmyRUS)
        {
        SetPlayerTeam(playerid,1);
        SetPlayerColor(playerid, TEAM_ArmyRUS_COLOR);
        }
        else if (gTeam[playerid] == TEAM_ArmyUSA)
        {
        SetPlayerTeam(playerid,2);
        SetPlayerColor(playerid, TEAM_ArmyUSA_COLOR);
        }
}
And this is the message I get:
Код:
~~~~~~~~~~~~~~~~~~~~~~~ : warning 209: function "SetPlayerTeamFromClass" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Help would be appreciated!
Reply


Messages In This Thread
OnPlayerConnect Error/Warning? - by kamzaf - 08.05.2012, 21:30
Re: OnPlayerConnect Error/Warning? - by TheDominator - 08.05.2012, 21:39
Re: OnPlayerConnect Error/Warning? - by kamzaf - 08.05.2012, 21:44
Re: OnPlayerConnect Error/Warning? - by TheDominator - 08.05.2012, 22:06
Re: OnPlayerConnect Error/Warning? - by kamzaf - 08.05.2012, 22:17
Re: OnPlayerConnect Error/Warning? - by TheDominator - 08.05.2012, 22:19
Re: OnPlayerConnect Error/Warning? - by paulor - 09.05.2012, 01:16

Forum Jump:


Users browsing this thread: 2 Guest(s)