[SOLVED]gTeam Class Help! (PLEASE REMOVE) -
DEJORDZTA - 03.08.2009
Hey guys!!
I have my Tokyo Drift Server (i know another one....but still) almost ready to get hosted and stuff,
But!! I have this slight error...
I copied it from the gangwars and area 51 script but both return an error... i have the:
new gTeam [MAXPLAYERS] at the top of my page.. along with other gTEAM ones but when i get to:
SetPLayerTeamfromClass i get this error:
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 017: undefined symbol "gTeam"
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : warning 215: expression has no effect
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 001: expected token: ";", but found "]"
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 029: invalid expression, assumed zero
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : fatal error 107: too many error messages on one line
and this is what i have under the setplaywerTeamfromClass:
if(classid == 0 || classid == 1 || classid == 2) {
gTeam[playerid] = TEAM_DRIFT;
} else if(classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid ==

{
gTeam[playerid] = TEAM_SEAN;
} else if(classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13) {
gTeam[playerid] = TEAM_NEUTRAL;
} else if(classid == 14 || classid == 15 || classid == 16 || classid == 17 || classid == 18 || classid == 19 || classid == 20) {
gTeam[playerid] = TEAM_OTHER;
} else if(classid == 21 || classid == 22 || classid == 23 || classid == 24 || classid == 25 || classid == 26 || classid == 27 || classid == 28 || classid == 29 || classid == 30 || classid == 31 || classid == 32 || classid == 33 || classid == 34 || classid == 35 || classid == 36 || classid == 37 || classid == 38 || classid == 39 || classid == 40 || classid == 41 || classid == 42 || classid == 43 || classid == 44) {
gTeam[playerid] = TEAM_ADMIN;
}
}
and i have checked that it's exactly the same as the area 51 stuff and the other teams but only Team_DRIFT comes up with the error!!
Please help!!!
NOTE: line 424 is
Код:
gTeam[playerid] = TEAM_DRIFT;
but this doesn't happen to any other... and atm nothing is wrong as it is taken from the area 51 script and the gangwars script...
Re: Team Class Pawno Help! -
Marc_307 - 03.08.2009
Which one is line 424?
Re: Team Class Pawno Help! -
Agent Smith - 03.08.2009
Im guessing
Код:
gTeam[playerid] = TEAM_DRIFT;
Re: Team Class Pawno Help! -
krisk - 03.08.2009
Quote:
Originally Posted by samdudes01
Im guessing
Код:
gTeam[playerid] = TEAM_DRIFT;
|
Same, seems like he've forgotten to create the variable. You simply can't get that error if you have this on the top of your script, look for typos.
new gTeam[MAX_PLAYERS];
or probably better;
static gTeam[MAX_PLAYERS];
Re: Team Class Pawno Help! -
DEJORDZTA - 04.08.2009
Quote:
Originally Posted by DEJORDZTA
I HAVE THE:
new gTeam[MAX_PLAYERS] at the top of my page.. along with other gTEAM ones but when i get to:
SetPlayerTeamfromClass i get this error:
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 017: undefined symbol "gTeam"
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : warning 215: expression has no effect
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 001: expected token: ";", but found "]"
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : error 029: invalid expression, assumed zero
*****\samp02Xserver.win32\gamemodes\RealDrift.pwn( 424) : fatal error 107: too many error messages on one line
and this is what i have under the setplayerTeamfromClass:
if(classid == 0 || classid == 1 || classid == 2) {
gTeam[playerid] = TEAM_DRIFT;
} else if(classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid ==  {
gTeam[playerid] = TEAM_SEAN;
} else if(classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13) {
gTeam[playerid] = TEAM_NEUTRAL;
} else if(classid == 14 || classid == 15 || classid == 16 || classid == 17 || classid == 18 || classid == 19 || classid == 20) {
gTeam[playerid] = TEAM_OTHER;
} else if(classid == 21 || classid == 22 || classid == 23 || classid == 24 || classid == 25 || classid == 26 || classid == 27 || classid == 28 || classid == 29 || classid == 30 || classid == 31 || classid == 32 || classid == 33 || classid == 34 || classid == 35 || classid == 36 || classid == 37 || classid == 38 || classid == 39 || classid == 40 || classid == 41 || classid == 42 || classid == 43 || classid == 44) {
gTeam[playerid] = TEAM_ADMIN;
}
}
and i have checked that it's exactly the same as the area 51 stuff and the other teams
BUT ONLY
Team_DRIFT comes up with the error!!
Please help!!!
|
And thanks for all the help and quick replies.... i have used the gangwars and area 51 script, so i've got the static and new gTeam at the top of my script along with other stuff but ONLY the TEAM_DRIFT line (424: gTeam[playerid] = TEAM_DRIFT

fails..... and i've checked my spelling error's and stuff, nothin wrong now... but sill not working.......
Thanks again aswell
Re: Team Class Pawno Help! -
Agent Smith - 04.08.2009
Wrong code:
Код:
new gTeam [MAXPLAYERS]
It should be:
Код:
new gTeam[MAX_PLAYERS];
Re: Team Class Pawno Help! -
DEJORDZTA - 05.08.2009
Bummer, still not working and i have checked all mistake in script.. there's nothing wrong spelling and punctuation wise.....
Any suggestions?
Re: Team Class Pawno Help! -
DEJORDZTA - 10.08.2009
Sorry for the double post here but has anyone got some help?
I could send part of my script to anyone who is willing to help, and your name will definatly go in the credits on start-up so whenever someone connects, your name will be mentioned.
Thanks Again,
DEJORDZTA
Re: Team Class Pawno Help! -
WrathOfGenesis - 10.08.2009
Make sure that new gTeam[MAX_PLAYERS] wasnt placed inside any functions
Re: Team Class Pawno Help! -
DEJORDZTA - 13.08.2009
Nope, made sure it wasn't inside any functions, real mystery to me still........
Thanks Again to every1 helping!