Giving me 1 Error
#2

You have two else statements around line 84. I'm not sure exactly what line 84 is, but from what I can see the statement which reads:

else
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}

Needs to be changed too

else if(classid == 2)
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}

Because right now, when you have two else-statements they are both going to take effect under the same circumstances, meaning that your system won't function properly.

All together it should look like:

Code:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2531.1123,-899.7438,86.4038,183.2012);
SetPlayerCameraPos(playerid, 2535.2781,-914.8342,86.3623,18.3863);
SetPlayerCameraLookAt(playerid, 2531.1123,-899.7438,86.4038,183.2012);
if(classid == 1)
{
gTeam[playerid] = TEAM_GROVE;
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
else if(classid == 2)
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
else
{
gTeam[playerid] = TEAM_VAGOS;
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}
return 1;
}
Reply


Messages In This Thread
Giving me 1 Error - by Mr.Black - 01.07.2011, 14:52
Re: Giving me 1 Error - by Revolutionary Roleplay - 01.07.2011, 14:59
Re: Giving me 1 Error - by Mr.Black - 01.07.2011, 15:14
Re: Giving me 1 Error - by Revolutionary Roleplay - 01.07.2011, 16:11
Re: Giving me 1 Error - by Mr.Black - 01.07.2011, 16:20

Forum Jump:


Users browsing this thread: 3 Guest(s)