#define TEAM_GROVE 0 #define TEAM_BALLAS 1
#define TEAM_VAGOS 2
#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_VAGOS 3
#define TEAM_NORMAL 4
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow
#define TEAM_NORMAL_COLOR 0xFFFFFFAA // White
new gTeam[MAX_PLAYERS];
SetPlayerTeamFromClass(playerid)
{
new classid = GetPlayerSkin(playerid);
if (classid == 0) {
gTeam[playerid] = TEAM_GROVE; }
if(classid == 105){
gTeam[playerid] = TEAM_GROVE; }
if(classid == 106){
gTeam[playerid] = TEAM_GROVE; }
if(classid == 107){
gTeam[playerid] = TEAM_GROVE; }
if(classid == 102){
gTeam[playerid] = TEAM_BALLA; }
if(classid == 103){
gTeam[playerid] = TEAM_BALLA; }
if(classid == 104){
gTeam[playerid] = TEAM_BALLA; }
if(classid == 108){
gTeam[playerid] = TEAM_VAGOS; }
if(classid == 109){
gTeam[playerid] = TEAM_VAGOS; }
if(classid == 110){
gTeam[playerid] = TEAM_VAGOS
}
return 1;
}
C:\Gta sa server\gamemodes\freeroam.pwn(38) : error 001: expected token: ";", but found "}" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if(classid == 110){
gTeam[playerid] = TEAM_VAGOS
}
if(classid == 110){
gTeam[playerid] = TEAM_VAGOS;
}
|
Originally Posted by Pawno_Master
i have 1 little error
Код:
if(classid == 110){
gTeam[playerid] = TEAM_VAGOS; // Forgot a semi-colon on this line.
}
|
expected token: ";", but found "}"
|
Originally Posted by samgreen
Quote:
Код:
expected token: ";", but found "}" |
|
Originally Posted by Luka™
Quote:
|
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,0); // kills the player
return 1;
}
if (strcmp("/commands", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,"For Commands type /gamecmds");// the players commands
return 1;
}
if (strcmp("/gamecmds", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,"/animlist a list with animations");// the players commands
SendClientMessage(playerid,0xAA3333AA,"/kill this command will kill you!");// killplayer command
return 1;
}
if(strcmp(cmd,"/copcommands",true)==0)
{
if(gTeam[playerid] == TEAM_COPS)
{
SendClientMessage(playerid,0xAA3333AA,"/cuff ID /arrest ID /fine ID /rp ID");
else ;
SendClientMessage(playerid,0xAA3333AA,"you are not a cop!");
}
return 1;
}
return 1;
}
C:\Gta sa server\gamemodes\freeroam.pwn(361) : error 017: undefined symbol "cmd" C:\Gta sa server\gamemodes\freeroam.pwn(366) : error 029: invalid expression, assumed zero C:\Gta sa server\gamemodes\freeroam.pwn(366) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. code] i don't know what i do wrong xD help me plz again
SendClientMessage(playerid,0xAA3333AA,"/cuff ID /arrest ID /fine ID /rp ID");
else if
SendClientMessage(playerid,0xAA3333AA,"you are not a cop!");
SendClientMessage(playerid,0xAA3333AA,"/cuff ID /arrest ID /fine ID /rp ID"); }
else if{
SendClientMessage(playerid,0xAA3333AA,"you are not a cop!");}
C:\Gta sa server\gamemodes\freeroam.pwn(361) : error 017: undefined symbol "cmd" C:\Gta sa server\gamemodes\freeroam.pwn(367) : error 008: must be a constant expression; assumed zero C:\Gta sa server\gamemodes\freeroam.pwn(367) : error 029: invalid expression, assumed zero C:\Gta sa server\gamemodes\freeroam.pwn(369) : warning 217: loose indentation C:\Gta sa server\gamemodes\freeroam.pwn(371) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
if(something)
{
}
new cmd[128];
if (strcmp(cmd,"/copcommands",true)==0)
if (strcmp("/copcommands", cmdtext, true, 10) == 0)
|
Originally Posted by Luka™
Just change
pawn Код:
pawn Код:
|
|
Originally Posted by lol2112
Add:
Код:
new cmd[128]; |
|
Originally Posted by Don Correlli
Quote:
|
|
Originally Posted by samgreen
You both need to review the documentation on strings in the Pawn language specification.
|
|
Originally Posted by Luka™
Just indent your code.
|