SetPlayerTeamFromClass warning
#1

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.
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)