what is the problem? -
Er@x3r - 11.07.2013
http://pastebin.com/Gm4RWtcA
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(67) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(67) : error 004: function "OnPlayerConnect" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(72) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(72) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(72) : error 004: function "OnPlayerDisconnect" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(77) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(77) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(77) : error 004: function "OnPlayerSpawn" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(80) : error 017: undefined symbol "SetPlayerTeamFromClass"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(84) : error 017: undefined symbol "GROVE_STREET"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(10
: error 017: undefined symbol "SetPlayerToTeamColour"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(135) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(135) : error 004: function "OnPlayerDeath" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : error 004: function "OnVehicleSpawn" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(145) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(145) : error 029: invalid expression, assumed zero
Respuesta: what is the problem? -
Parka - 11.07.2013
use [ pawn ] [ / pawn ] for better visualization of the code.
Re: what is the problem? -
Rohlik - 11.07.2013
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define GROVE 1
#define BALLAS 2
#define AZTECAS 3
#define VAGOS 4
#define YAKUZA 5
#define BIKER 6
#define GROVE_COLOUR 0x00820FAA
#define BALLAS_COLOUR 0xC2A2DAAA
#define AZTECAS_COLOUR 0x01FCFFC8
#define VAGOS_COLOUR 0xFFFF00AA
#define VAGOS_COLOUR 0xFFFF00AA
#define BIKER_COLOUR 0xAFAFAFAA
#define YAKUZA_COLOUR 0xAA3333AA
#if defined FILTERSCRIPT
#endif
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 OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = GROVE_STREET;
}
if(classid == 1)
{
gTeam[playerid] = BALLAS;
}
if(classid == 2)
{
gTeam[playerid] = VAGOS;
}
if(classid == 3)
{
gTeam[playerid] = AZTECAS;
}
if(classid == 4)
{
gTeam[playerid] = BIKER;
}
if(classid == 5)
{
gTeam[playerid] = YAKUZA;
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == GROVE)
{
SetPlayerColor(playerid,GROVE_COLOUR); //Green
}
if(gTeam[playerid] == BALLAS)
{
SetPlayerColor(playerid,BALLAS_COLOUR); //Purple
}
if(gTeam[playerid] == VAGOS)
{
SetPlayerColor(playerid,VAGOS_COLOUR); //Yellow
}
if(gTeam[playerid] == AZTECAS)
{
SetPlayerColor(playerid,AZTECAS_COLOUR); //Cyan
}
if(gTeam[playerid] == BIKER)
{
SetPlayerColor(playerid,BIKER_COLOUR); //Gray
}
if(gTeam[playerid] == YAKUZA)
{
SetPlayerColor(playerid,YAKUZA_COLOUR); //Red
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
You must add "}" to " SetPlayerToTeamColour(playerid)"
Re: what is the problem? -
JimmyCh - 11.07.2013
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define GROVE 1
#define BALLAS 2
#define AZTECAS 3
#define VAGOS 4
#define YAKUZA 5
#define BIKER 6
#define GROVE_COLOUR 0x00820FAA
#define BALLAS_COLOUR 0xC2A2DAAA
#define AZTECAS_COLOUR 0x01FCFFC8
#define VAGOS_COLOUR 0xFFFF00AA
#define VAGOS_COLOUR 0xFFFF00AA
#define BIKER_COLOUR 0xAFAFAFAA
#define YAKUZA_COLOUR 0xAA3333AA
#if defined FILTERSCRIPT
#endif
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 OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = GROVE;
}
if(classid == 1)
{
gTeam[playerid] = BALLAS;
}
if(classid == 2)
{
gTeam[playerid] = VAGOS;
}
if(classid == 3)
{
gTeam[playerid] = AZTECAS;
}
if(classid == 4)
{
gTeam[playerid] = BIKER;
}
if(classid == 5)
{
gTeam[playerid] = YAKUZA;
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == GROVE)
{
SetPlayerColor(playerid,GROVE_COLOUR); //Green
}
if(gTeam[playerid] == BALLAS)
{
SetPlayerColor(playerid,BALLAS_COLOUR); //Purple
}
if(gTeam[playerid] == VAGOS)
{
SetPlayerColor(playerid,VAGOS_COLOUR); //Yellow
}
if(gTeam[playerid] == AZTECAS)
{
SetPlayerColor(playerid,AZTECAS_COLOUR); //Cyan
}
if(gTeam[playerid] == BIKER)
{
SetPlayerColor(playerid,BIKER_COLOUR); //Gray
}
if(gTeam[playerid] == YAKUZA)
{
SetPlayerColor(playerid,YAKUZA_COLOUR); //Red
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
This is how it should be.
You also put GROVE_STREET, should be GROVE.
Re: what is the problem? -
Er@x3r - 11.07.2013
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(63) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(64) : error 001: expected token: ";", but found "{"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(70) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(70) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(70) : error 004: function "OnPlayerConnect" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(75) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(75) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(75) : error 004: function "OnPlayerDisconnect" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(80) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(80) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(80) : error 004: function "OnPlayerSpawn" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(83) : error 017: undefined symbol "SetPlayerTeamFromClass"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(111) : error 017: undefined symbol "SetPlayerToTeamColour"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(140) : error 004: function "OnPlayerDeath" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(145) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(145) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(145) : error 004: function "OnVehicleSpawn" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(150) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(150) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(150) : error 004: function "OnVehicleDeath" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(155) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(155) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(155) : error 004: function "OnPlayerText" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(160) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(160) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(160) : error 004: function "OnPlayerCommandText" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(162) : error 017: undefined symbol "cmdtext"
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(170) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(170) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(170) : error 004: function "OnPlayerEnterVehicle" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(175) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(175) : error 029: invalid expression, assumed zero
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(175) : error 004: function "OnPlayerExitVehicle" is not implemented
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(180) : warning 225: unreachable code
E:\grand theft auto\server\gamemodes\UnlimitedGangwar.pwn(180) : error 029: invalid expression, assumed zero
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: what is the problem? -
Darnell - 11.07.2013
pawn Код:
#include <a_samp>
new gTeam[MAX_PLAYERS];
#define GROVE 1
#define BALLAS 2
#define AZTECAS 3
#define VAGOS 4
#define YAKUZA 5
#define BIKER 6
forward SetPlayerTeamFromClass(playerid, classid);
#define GROVE_COLOUR 0x00820FAA
#define BALLAS_COLOUR 0xC2A2DAAA
#define AZTECAS_COLOUR 0x01FCFFC8
#define VAGOS_COLOUR 0xFFFF00AA
#define VAGOS_COLOUR 0xFFFF00AA
#define BIKER_COLOUR 0xAFAFAFAA
#define YAKUZA_COLOUR 0xAA3333AA
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)
{
SetPlayerTeamFromClass(playerid, classid);
if(classid == 0)
{
gTeam[playerid] = LawEnforcment1;
GameTextForPlayer(playerid,"~b~Police Officer",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0x0000BBAA); // Teamcolor
}
if(classid == 1)
{
gTeam[playerid] = LawEnforcment2;
GameTextForPlayer(playerid,"~p~San Andreas Army",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0x8B008BAA); // Teamcolor
}
if(classid == 2)
{
gTeam[playerid] = LawEnforcment3;
GameTextForPlayer(playerid,"~b~Police Officer",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0x0000BBAA); // Teamcolor
}
}
Edit this to your liking.
Re: what is the problem? -
Konstantinos - 11.07.2013
You forgot to end a callback... Look the code below and you will see. OnPlayerRequestClass doesn't return and close the bracket.
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define GROVE 1
#define BALLAS 2
#define AZTECAS 3
#define VAGOS 4
#define YAKUZA 5
#define BIKER 6
#define GROVE_COLOUR 0x00820FAA
#define BALLAS_COLOUR 0xC2A2DAAA
#define AZTECAS_COLOUR 0x01FCFFC8
#define VAGOS_COLOUR 0xFFFF00AA
#define VAGOS_COLOUR 0xFFFF00AA
#define BIKER_COLOUR 0xAFAFAFAA
#define YAKUZA_COLOUR 0xAA3333AA
#if defined FILTERSCRIPT
#endif
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 OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = GROVE_STREET;
}
if(classid == 1)
{
gTeam[playerid] = BALLAS;
}
if(classid == 2)
{
gTeam[playerid] = VAGOS;
}
if(classid == 3)
{
gTeam[playerid] = AZTECAS;
}
if(classid == 4)
{
gTeam[playerid] = BIKER;
}
if(classid == 5)
{
gTeam[playerid] = YAKUZA;
}
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == GROVE)
{
SetPlayerColor(playerid,GROVE_COLOUR); //Green
}
if(gTeam[playerid] == BALLAS)
{
SetPlayerColor(playerid,BALLAS_COLOUR); //Purple
}
if(gTeam[playerid] == VAGOS)
{
SetPlayerColor(playerid,VAGOS_COLOUR); //Yellow
}
if(gTeam[playerid] == AZTECAS)
{
SetPlayerColor(playerid,AZTECAS_COLOUR); //Cyan
}
if(gTeam[playerid] == BIKER)
{
SetPlayerColor(playerid,BIKER_COLOUR); //Gray
}
if(gTeam[playerid] == YAKUZA)
{
SetPlayerColor(playerid,YAKUZA_COLOUR); //Red
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Re: what is the problem? -
thefatshizms - 11.07.2013
First: You are defining it as a filterscript yet using the callbacks of a gamemode?
Second: Please fix your indentation
Third: You are missing semi colons and returns
Re: what is the problem? -
Rohlik - 11.07.2013
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
To--
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
( Thx Jimmy )
pawn Код:
if(classid == 0)
{
gTeam[playerid] = GROVE_STREET;
}
-- To
pawn Код:
if(classid == 0)
{
gTeam[playerid] = GROVE;
}
Re: what is the problem? -
JimmyCh - 11.07.2013
Tell us if it works...