Help :(
#1

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid)
    {
        if (classid == 0)
        {
            gTeam[playerid] = TEAM_COPS;
            return 1;
        }
        else if (classid == 1)
        {
            gTeam[playerid] = TEAM_CROOKS;
            return 1;
        }

    SetPlayerToTeamColor(playerid)
    {
        if (gTeam[playerid] == TEAM_COPS)
        {
            SetPlayerColor(playerid, COLOR_BLUE);
        }
    }
I think this is correct but i get these errors

C:\Users\h\Documents\LCRP\gamemodes\??.pwn(44) : error 017: undefined symbol "SetPlayerTeamFromClass"
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(57) : warning 217: loose indentation
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(57) : error 017: undefined symbol "SetPlayerToTeamColor"
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(65) : warning 217: loose indentation
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(65) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(65) : error 004: function "OnPlayerConnect" is not implemented
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(74) : warning 202: number of arguments does not match definition
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(76) : warning 217: loose indentation
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(82) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(82) : error 004: function "OnPlayerDisconnect" is not implemented
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(8 : error 017: undefined symbol "SERVER_USER_FILE"
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(97) : error 017: undefined symbol "reason"
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(106) : warning 225: unreachable code
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(106) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(106) : error 004: function "OnPlayerSpawn" is not implemented
C:\Users\hh\Documents\LCRP\gamemodes\??.pwn(111) : warning 225: unreachable code
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(111) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(111) : error 004: function "OnPlayerDeath" is not implemented
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(116) : warning 225: unreachable code
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(116) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(116) : error 004: function "OnVehicleSpawn" is not implemented
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(121) : warning 225: unreachable code
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(121) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(121) : error 004: function "OnVehicleDeath" is not implemented
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(126) : warning 225: unreachable code
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(126) : error 029: invalid expression, assumed zero
C:\Users\h\Documents\LCRP\gamemodes\??.pwn(126) : error 004: function "OnPlayerText" is not implemented
C:\Users\\Documents\LCRP\gamemodes\??.pwn(131) : warning 225: unreachable code
C:\Users\?\Documents\LCRP\gamemodes\??.pwn(131) : error 029: invalid expression, assumed zero
C:\Users\?\Documents\LCRP\gamemodes\??.pwn(131) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\??\Documents\LCRP\gamemodes\??.pwn(133) : error 017: undefined symbol "cmdtext"
C:\Users\?\Documents\LCRP\gamemodes\.pwn(141) : warning 225: unreachable code
C:\Users\?\Documents\LCRP\gamemodes\??.pwn(141) : error 029: invalid expression, assumed zero
C:\Users\?\Documents\LCRP\gamemodes\/??.pwn(141) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\?\Documents\LCRP\gamemodes\??.pwn(146) : warning 225: unreachable code
C:\Users\/\Documents\LCRP\gamemodes\.pwn(146) : error 029: invalid expression, assumed zero
C:\Users\?\Documents\LCRP\gamemodes\.pwn(146) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\/\Documents\LCRP\gamemodes\.pwn(151) : warning 225: unreachable code
C:\Users\?\Documents\LCRP\gamemodes\??.pwn(151) : error 029: invalid expression, assumed zero

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.


ive placed all errors there as if i get rid of the team system (all of it) these errors go
Reply
#2

pawn Код:
//BOTTOM OF SCRIPT
stock SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_COPS;
        return 1;
    }
    else if (classid == 1)
    {
        gTeam[playerid] = TEAM_CROOKS;
        return 1;
    }
}

stock SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_COPS)
    {
        SetPlayerColor(playerid, COLOR_BLUE);
    }
}
pawn Код:
public OnPlayerRequestClass(playerid, classid) //your callback
{
    SetPlayerTeamFromClass(/*playerid*/, /*classid*/);
    SetPlayerToTeamColor(playerid);
    return 1;
}
This may not fully be correct, but I fixed your syntax.
Reply
#3

pawn Код:
SetPlayerTeamFromClass(playerid, classid)
SetPlayerToTeamColor(playerid)
Both of those need to be OUT of any callback
Reply
#4

Note for those with the same problem just got back and though what if i do public which o think wesley was tryig to sayso i tryed it and it worked !!!! yay

schurman thanks for the help aswell but i cant use stock :S :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)