NEED Help with gTeam and... -
Sh@yaN - 06.06.2013
Hello,
i got some errors , i wish someone help.
this is the Whole GM: http://pastebin.com/MFE9bj0s (Please Take a Look at this...)
i got these Errors:
Код:
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(76) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(87) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(98) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(98 -- 99) : error 028: invalid subscript (not an array or too many subscripts): "playerid"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(98 -- 100) : error 001: expected token: "}", but found "if"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\test.pwn(98 -- 100) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
And What im doing wrong here:
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0, 1:
{
gTeam[playerid] = TEAM_ASSASINS; // >>> error 029: invalid expression, assumed zero
GameTextForPlayer(playerid, "~r~ASSASINS", 3000, 4);
SetPlayerPos(playerid, 2180.4934, 1676.8185, 11.1197); // Assasins Spawn Pos
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 2189.2839, 1677.0737, 11.1197); // Assasins Spawn CameraPos
SetPlayerCameraLookAt(playerid, 2180.4934, 1676.8185, 11.1197); // Assasins Spawn CameraLookAt
SetPlayerColor(playerid, RED);
return 1;
}
case 2, 3:
{
gTeam[playerid] = TEAM_POLICE; // >>> error 029: invalid expression, assumed zero
GameTextForPlayer(playerid, "~b~POLICE", 3000, 4);
SetPlayerPos(playerid, 2353.5962, 2405.6279, 10.8203); // Police Spawn Pos
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 2361.3018, 2405.6365, 10.8203); // Police Spawn CameraPos
SetPlayerCameraLookAt(playerid, 2353.5962, 2405.6279, 10.8203); // Police Spawn CameraLookAt
SetPlayerColor(playerid, BLUE);
return 1;
}
Re: NEED Help with gTeam and... -
greentarch - 06.06.2013
pawn Код:
#define TEAM_ASSASINS
#define TEAM_POLICE
Should be something like
pawn Код:
#define TEAM_ASSASINS 0
#define TEAM_POLICE 1
Re: NEED Help with gTeam and... -
Sh@yaN - 06.06.2013
Yea! thanks, Fixed
now these:
Код:
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\OTCGW.pwn(100) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\OTCGW.pwn(100 -- 101) : error 028: invalid subscript (not an array or too many subscripts): "playerid"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\OTCGW.pwn(100 -- 102) : error 001: expected token: "}", but found "if"
C:\Documents and Settings\ShayaN\Desktop\0.3X ServeR\gamemodes\OTCGW.pwn(100 -- 102) : fatal error 107: too many error messages on one line
Codes: http://pastebin.com/MFE9bj0s
Re: NEED Help with gTeam and... -
Giroud12 - 06.06.2013
Bro, which line?
Re: NEED Help with gTeam and... -
Sh@yaN - 06.06.2013
The Error Says Which Line...
Line 100 - 101 - 102
in
Codes: http://pastebin.com/MFE9bj0s
------
Edit:
i've used " SetPlayerColor(playerid, RED); " in " SetPlayerTeamFromClass(playerid, classid) "
now " SetPlayerToTeamColor(playerid) " is needed Again??
Re: NEED Help with gTeam and... -
Giroud12 - 06.06.2013
I think u need to put :
pawn Код:
forward SetPlayerToTeamColor(playerid);
before
pawn Код:
SetPlayerToTeamColor(playerid)
Re: NEED Help with gTeam and... -
Sh@yaN - 06.06.2013
i dont think so,
Than i'll get over 10 Errors....!
Re: NEED Help with gTeam and... -
Giroud12 - 06.06.2013
Give me that 10 errors.
Yeah its true,you need to put forwards !
Re: NEED Help with gTeam and... - Emmet_ - 06.06.2013
Here - fixed it for you.
http://pastebin.com/3vnKfw9x
Re: NEED Help with gTeam and... -
Sh@yaN - 06.06.2013
Quote:
Originally Posted by Emmet_
|
:O thanks !
but could you please Explain How?