SA-MP Forums Archive
gangs - 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: gangs (/showthread.php?tid=450230)



gangs - Er@x3r - 12.07.2013

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.


Respuesta: gangs - CIzaquita - 12.07.2013

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.


Re: gangs - Er@x3r - 12.07.2013

oh thanks
i'm blind :P


Re: gangs - JimmyCh - 12.07.2013

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


Re: gangs - Er@x3r - 12.07.2013

thanks is working


Respuesta: gangs - CIzaquita - 12.07.2013

You are wellcome, rep+ if it work




Re: gangs - Er@x3r - 12.07.2013

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