Little help - 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: Little help (
/showthread.php?tid=578653)
Little help -
Sanady - 21.06.2015
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.
Re: Little help -
Dusan01 - 21.06.2015
Hmmm is Enum TeamInfo before ur stock?
Re: Little help -
Sanady - 21.06.2015
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.
Re: Little help -
Dusan01 - 21.06.2015
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;
}
Re: Little help -
Sanady - 21.06.2015
Its static multidimensional array and its before the function
Re: Little help -
Sanady - 21.06.2015
Fixed