#1

In creating a cap zone.

I was following this tutorial. https://sampforum.blast.hk/showthread.php?tid=453013

Here are my errorrs:

: error 017: undefined symbol "gTeam"
: warning 215: expression has no effect
: error 001: expected token: ";", but found "]"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line

Line

if(tCP[CAPZONE] != gTeam[playerid])


I use this to my teams.


My enums.

pawn Код:
enum pInfo
{
    pPass[64],//Player saved password
    pAdmin,
    pMoney,//PlayerMoneys
    pScore,//Score
    pTeam,//Team
    pClass,//Class
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(Player[playerid][pTeam] <= 0)
    {
    SPD(playerid,4,DSL,"{FFFFFF}Select your team","{0000FF}Ukraine\n{FF0000}Russia","Select","");
    SendClientMessage(playerid,0xFF000000,"Your team select saved, to change your team,type /changeteam!");
    ShowPlayerMarkers(1);
    GangZoneShowForAll(GZ_ZONE1, 0x0080FF96);
    GangZoneShowForAll(GZ_ZONE2, 0xFF000096);
    }
    SavePlayer(playerid);
    if(Player[playerid][pTeam] == 1)
    {
    SetPlayerPos(playerid,-250.8406,2598.8433,62.8582);
    SetPlayerColor(playerid,0x0000FFFF);
    SetPlayerTeam(playerid,1);
    PlayerTextDrawShow(playerid,UkraineTextdraw[playerid]);
    {
    switch(random(4)) // генерируем число от 0 до 3 (включая)
    {
    case 0: SetPlayerSkin(playerid,124);
    case 1: SetPlayerSkin(playerid,125);
    case 2: SetPlayerSkin(playerid,126);
    case 3: SetPlayerSkin(playerid,127);
    }
    }
    }
    if(Player[playerid][pTeam] == 2)
    {
    SetPlayerPos(playerid,-149.9057,1079.6403,19.7422);
    SetPlayerColor(playerid,0xFF0000FF);
    ShowPlayerMarkers(1);
    GangZoneShowForAll(GZ_ZONE1, 0x0080FF96);
    GangZoneShowForAll(GZ_ZONE2, 0xFF000096);
    SetPlayerTeam(playerid,2);
    PlayerTextDrawShow(playerid,RussiaTextdraw[playerid]);
    {
Reply
#2

pawn Код:
new Player[MAX_PLAYERS][pInfo];
Reply
#3

I already have that
Reply
#4

then change

pawn Код:
if(tCP[CAPZONE] != gTeam[playerid])
to

pawn Код:
if(tCP[CAPZONE] != Player[playerid][pTeam])
Reply
#5

C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1565) : warning 209: function "OnPlayerEnterDynamicCP" should return a value
C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1602) : error 017: undefined symbol "gTeam"
C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1602) : warning 215: expression has no effect
C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1602) : error 001: expected token: ";", but found "]"
C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1602) : error 029: invalid expression, assumed zero
C:\Users\Ardit\Desktop\Server\Ukraine vs Russia\gamemodes\satdm.pwn(1602) : fatal error 107: too many error messages on one line
Reply
#6

change this
pawn Код:
if(Player[playerid][pTeam] == 1)
and this
pawn Код:
if(Player[playerid][pTeam] == 2)
to this
pawn Код:
else if(Player[playerid][pTeam] == 1)
and this
pawn Код:
else if(Player[playerid][pTeam] == 2)
Reply
#7

post line no 1602
Reply
#8

This one is if(gTeam[playerid] == TEAM_UKRAINE)
Reply
#9

Quote:
Originally Posted by Gogeta101
Посмотреть сообщение
This one is if(gTeam[playerid] == TEAM_UKRAINE)
you are not using gTeam in your script thats why its giving errors gTeam you did not defined gTeam you defined pTeam so use

pawn Код:
if(Player[playerid][pTeam] == TEAM_UKRAINE)
Reply
#10

Also this one if(gTeam[i] == gTeam[playerid])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)