#1

what can be the problem?

http://pastebin.com/tWK4Yv4L


ERROR:


E:\grand theft auto\server\gamemodes\gangz.pwn(72) : error 040: duplicate "case" label (value 4)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
case 4:
{
GameTextForPlayer( playerid, "~l~BIKER", 300, 3 );
SetPlayerTeam( playerid,BIKER );
}
case 4:
{
GameTextForPlayer( playerid, "~r~YAKUZA", 300, 3 );
SetPlayerTeam( playerid,YAKUZA );
}
"case 4" is duplicated, put case 5 or the next value.
Reply
#3

oh thanks
i'm blind :P
Reply
#4

Use this:
pawn Код:
#include <a_samp>
 
#define GROVE 0
#define BALLAS 1
#define AZTECAS 2
#define VAGOS 3
#define YAKUZA 4
#define BIKER 5
 
 
#define FILTERSCRIPT
 
public OnGameModeInit( )
{
SetGameModeText("Gangwar");
AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//GROVE
AddPlayerClass(106, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//GROVE
AddPlayerClass(107, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//GROVE
AddPlayerClass(270, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//GROVE
AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BALLAS
AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BALLAS
AddPlayerClass(104, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BALLAS
AddPlayerClass(296, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BALLAS
AddPlayerClass(108, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//VAGOS
AddPlayerClass(109, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//VAGOS
AddPlayerClass(110, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//VAGOS
AddPlayerClass(30, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//VAGOS
AddPlayerClass(114, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//AZTECAS
AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//AZTECAS
AddPlayerClass(116, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//AZTECAS
AddPlayerClass(292, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//AZTECAS
AddPlayerClass(100, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BIKER
AddPlayerClass(247, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BIKER
AddPlayerClass(248, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BIKER
AddPlayerClass(181, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//BIKER
AddPlayerClass(118, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//YAKUZA
AddPlayerClass(120, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//YAKUZA
AddPlayerClass(228, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//YAKUZA
AddPlayerClass(294, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//YAKUZA
return 1;
}
 
public OnPlayerRequestClass( playerid, classid )
{
switch ( classid )
{
case 0:
{
GameTextForPlayer( playerid, "~g~GROVE STREET", 300, 3 );
SetPlayerTeam( playerid,GROVE );
}
case 1:
{
GameTextForPlayer( playerid, "~p~BALLAS", 300, 3 );
SetPlayerTeam( playerid,BALLAS );
}
case 2:
{
GameTextForPlayer( playerid, "~y~VAGOS", 300, 3 );
SetPlayerTeam( playerid,VAGOS );
}
case 3:
{
GameTextForPlayer( playerid, "~c~AZTECAS", 300, 3 );
SetPlayerTeam( playerid,AZTECAS );
}
case 4:
{
GameTextForPlayer( playerid, "~l~BIKER", 300, 3 );
SetPlayerTeam( playerid,BIKER );
}
case 4:
{
GameTextForPlayer( playerid, "~r~YAKUZA", 300, 3 );
SetPlayerTeam( playerid,YAKUZA );
}
}
return 1;
}
You're welcome.


EDIT:Too late xD
Reply
#5

thanks is working
Reply
#6

You are wellcome, rep+ if it work

Reply
#7

sorry ,,you have given out too much Reputation in the last 24 hours, try again later''
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)