Little help
#1

Hello, I am working on my server, and I am connecting includes to one main GM, and I am using one if which is displeying me colors of the zones, but when I compile that in main script, it`s show me up errors. Here is the whole function:
pawn Код:
stock GetTeamColor(teamid)
{
    //Ako je NO_TEAM ili ide u overflow vrati belu boju
    if(teamid == NO_TEAM || teamid >= sizeof(TeamInfo) || teamid < 0) return white;
    else return TeamInfo[teamid][TeamColor];
}
Here is the if function which is causing problems:
pawn Код:
if(teamid == NO_TEAM || teamid >= sizeof(TeamInfo) || teamid < 0) return white;
Here are the errrors:
Код:
../TDM/TeamZones.pwn(260) : error 017: undefined symbol "TeamInfo"
../TDM/TeamZones.pwn(260) : error 029: invalid expression, assumed zero
../TDM/TeamZones.pwn(260) : warning 215: expression has no effect
../TDM/TeamZones.pwn(260) : error 001: expected token: ";", but found ")"
../TDM/TeamZones.pwn(260) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

Hmmm is Enum TeamInfo before ur stock?
Reply
#3

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
Hmmm is Enum TeamInfo before ur stock?
Teaminfo is array... And it`s from other include which are connected between.
Reply
#4

try it without TeamInfo like this and see it there any errors, and give us that array and how mutch dimensions it has? 2?
PHP код:
stock GetTeamColor(teamid)
{
    if(
teamid == NO_TEAM)
    {
    return 
white;
    }
    
/*else if(teamid >= sizeof(TeamInfo))
    {
    return white;
    }*/
    
else if(teamid 0)
    {
    return 
white;
    }
    else return 
TeamInfo[teamid][TeamColor];
return 
1;

Reply
#5

Its static multidimensional array and its before the function
Reply
#6

Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)