SA-MP Forums Archive
SetPlayerTeamFromClass warning - 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: SetPlayerTeamFromClass warning (/showthread.php?tid=461184)



SetPlayerTeamFromClass warning - FaceTutorialz - 31.08.2013

I got a very basic team code that compiles, but I cannot start it on server.exe

The code

pawn Код:
#include <a_samp>

#define TEAM_MUTANTS
#define TEAM_HUMANS

#define MUTANTSCOLOR 0xFF990000
#define HUMANSCOLOR 0x00CCFF00


public OnGameModeInit()
{
AddPlayerClass(0,-166.8875,1127.4188,19.7500,265.7991,9,1,0,0,0,0);
AddPlayerClass(0,18.5250,1074.7057,20.2422,9.4717,5,1,0,0,0,0);
return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
     Switch(classid)
     {
     case 0 :gTeam[playerid] = MUTANTS;
     case 1 :gTeam[playerid] = HUMANS;
     }
}
The warning

Код:
C:\Users\dakota pittman\Desktop\Localhost\gamemodes\TESTPLSWORK.pwn(17) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: SetPlayerTeamFromClass warning - ProjectMan - 31.08.2013

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}
Also, where are the rest of the code? If that is your whole script then you are doing it wrong. You have to have other callbacks. Open up pawno, click "New" and start from there.