F:\IS\pawno\include\stockgangwar.inc(237) : error 017: undefined symbol "ZoneInfo" F:\IS\pawno\include\stockgangwar.inc(254) : error 017: undefined symbol "ZoneInfo" F:\IS\pawno\include\stockgangwar.inc(254) : error 036: empty statement F:\IS\pawno\include\stockgangwar.inc(254) : error 017: undefined symbol "i" F:\IS\pawno\include\stockgangwar.inc(254) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
//--IS 0.3z V2.0 ---------------//
//Bugs Fixed By Deadly----------//
#include <a_samp>
#include <zcmd>
#include <stockgangwar>
new PlayerKills[MAX_PLAYERS] = 0, Dominating[MAX_PLAYERS] = 0;
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
new ZoneDeaths[sizeof(ZoneInfo)];
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_MEMBERS_TO_START_WAR 1 // how many team members needed in a zone to start a war
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 1 // how many team members must be killed in a zone to start a war
new Teams[] = {
TEAM_GROVE,
TEAM_BALLAS,
TEAM_VAGOS
};
#define Dialog_Welcome 1
#include <streamer>
#include <sscanf2>
#define COLOR_GREY 0x808080FF
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_GREEN 0x088A08FF
#pragma tabsize 0
#define player_x -250.9738
#define player_y 2585.6497
#define player_z 63.5703
#define player_angle 210.3500
//---------------------------------GangWar ----------------------//
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
//------------------------------------------------------end----//
//--Zones-------------//
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam
}
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneID[sizeof(ZoneInfo)];
if(PlayerKills[killerid] == 6)
F:\IS\pawno\include\stockgangwar.inc(254) |
Error isn't in this code, it is in stockgangwar.inc include.
Open stockgangwar.inc in pawno and find lines with errors. |
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
new ZoneDeaths[sizeof(ZoneInfo)];
//--Zones-------------//
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam
}
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneID[sizeof(ZoneInfo)];
put these code
pawn Code:
pawn Code:
|
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam
}
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneID[sizeof(ZoneInfo)];
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
F:\IS\pawno\include\stockgangwar.inc(237) : error 017: undefined symbol "ZoneInfo" F:\IS\pawno\include\stockgangwar.inc(237) : error 029: invalid expression, assumed zero F:\IS\pawno\include\stockgangwar.inc(237) : error 029: invalid expression, assumed zero F:\IS\pawno\include\stockgangwar.inc(237) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Do what AiRaLoKa said but in the include itself.
It should work |
#define FILTERSCRIPT
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
new ZoneDeaths[sizeof(ZoneInfo)];
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneID[sizeof(ZoneInfo)];
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_MEMBERS_TO_START_WAR 2
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 2 // how many team members must be killed in a zone to start a war
new Teams[] = {
TEAM_GROVE,
TEAM_BALLAS,
TEAM_VAGOS
};// how many team members needed in a zone to start a war
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
#include <a_samp>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Gangwar by Deadly");
print("--------------------------------------\n");
for(new i=0; i < sizeof(ZoneInfo); i++)
{
ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
SetTimer("ZoneTimer", 1000, true);
SetTimer("ZoneTimer", 1000, true);
}
return 1;
}
stock IsPlayerInZone(playerid, zoneid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
}
stock GetPlayersInZone(zoneid, teamid)
{
new count;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == teamid && IsPlayerInZone(i, zoneid))
{
count++;
}
}
return count;
}
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam
}
public OnFilterScriptExit()
{
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)
{
for(new i=0; i < sizeof(ZoneInfo); i++)
{
GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
}
for(new i=0; i < sizeof(ZoneInfo); i++)
{
GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
}
return 1;
}
stock GetTeamZoneColor(teamid)
{
switch(teamid)
{
case TEAM_GROVE: return 0x00FF0088;
case TEAM_BALLAS: return 0xFF00FF88;
case TEAM_VAGOS: return 0xFFFF0088;
}
return -1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerConnected(killerid) && GetPlayerTeam(playerid) != GetPlayerTeam(killerid)) // not a suicide or team kill
{
new zoneid = GetPlayerZone(playerid);
if(zoneid != -1 && ZoneInfo[zoneid][zTeam] == GetPlayerTeam(playerid)) // zone member has been killed in the zone
{
ZoneDeaths[zoneid]++;
if(ZoneDeaths[zoneid] == MIN_DEATHS_TO_START_WAR)
{
ZoneDeaths[zoneid] = 0;
ZoneAttacker[zoneid] = GetPlayerTeam(killerid);
ZoneAttackTime[zoneid] = 0;
GangZoneFlashForAll(ZoneID[zoneid], GetTeamZoneColor(ZoneAttacker[zoneid]));
}
}
}
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;
}
public ZoneTimer()
{
for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
{
if(ZoneAttacker[i] != -1) // zone is being attacked
{
if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneInfo[i][zTeam] = ZoneAttacker[i];
GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
ZoneAttacker[i] = -1;
}
}
else // attackers failed to take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneAttacker[i] = -1;
}
}
else // check if somebody is attacking
{
for(new t=0; t < sizeof(Teams); t++) // loop all teams
{
if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
{
ZoneAttacker[i] = Teams[t];
ZoneAttackTime[i] = 0;
GangZoneFlashForAll(ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
}
}
}
}
}
public ZoneTimer()
{
for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
{
if(ZoneAttacker[i] != -1) // zone is being attacked
{
if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneInfo[i][zTeam] = ZoneAttacker[i];
GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
ZoneAttacker[i] = -1;
}
}
else // attackers failed to take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneAttacker[i] = -1;
}
}
}
}
stock GetPlayerZone(playerid)
{
for(new i=0; i < sizeof(ZoneInfo); i++)
{
if(IsPlayerInZone(playerid, i))
{
return i;
}
}
return -1;
}
F:\IS\gamemodes\GIS.pwn(5) : error 017: undefined symbol "ZoneInfo" F:\IS\gamemodes\GIS.pwn(6) : error 017: undefined symbol "eZone" F:\IS\gamemodes\GIS.pwn(32) : error 017: undefined symbol "zMinX" F:\IS\gamemodes\GIS.pwn(42) : error 017: undefined symbol "zMinX" F:\IS\gamemodes\GIS.pwn(94) : warning 217: loose indentation F:\IS\gamemodes\GIS.pwn(99) : warning 217: loose indentation F:\IS\gamemodes\GIS.pwn(290) : warning 235: public function lacks forward declaration (symbol "ZoneTimer") F:\IS\gamemodes\GIS.pwn(327) : warning 235: public function lacks forward declaration (symbol "ZoneTimer") F:\IS\gamemodes\GIS.pwn(328) : error 021: symbol already defined: "ZoneTimer" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
F:\IS\gamemodes\GIS.pwn(5) : error 017: undefined symbol "ZoneInfo" F:\IS\gamemodes\GIS.pwn(6) : error 017: undefined symbol "eZone" F:\IS\gamemodes\GIS.pwn(32) : error 017: undefined symbol "zMinX" F:\IS\gamemodes\GIS.pwn(42) : error 017: undefined symbol "zMinX" F:\IS\gamemodes\GIS.pwn(94) : warning 217: loose indentation F:\IS\gamemodes\GIS.pwn(99) : warning 217: loose indentation F:\IS\gamemodes\GIS.pwn(290) : warning 235: public function lacks forward declaration (symbol "ZoneTimer") F:\IS\gamemodes\GIS.pwn(327) : warning 235: public function lacks forward declaration (symbol "ZoneTimer") |
#define FILTERSCRIPT
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
new ZoneDeaths[sizeof(ZoneInfo)];
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneID[sizeof(ZoneInfo)];
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_MEMBERS_TO_START_WAR 2
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 2 // how many team members must be killed in a zone to start a war
new Teams[] = {
TEAM_GROVE,
TEAM_BALLAS,
TEAM_VAGOS
};// how many team members needed in a zone to start a war
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
#include <a_samp>
#define FILTERSCRIPT
#include <a_samp>
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_MEMBERS_TO_START_WAR 2
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 2 // how many team members must be killed in a zone to start a war
new Teams[] = {
TEAM_GROVE,
TEAM_BALLAS,
TEAM_VAGOS
};// how many team members needed in a zone to start a war
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam
}
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
new ZoneInfo[][eZone] = {
{2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
{2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
{2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
};
new ZoneDeaths[sizeof(ZoneInfo)];
new ZoneID[sizeof(ZoneInfo)];
public ZoneTimer()
{
for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
{
if(ZoneAttacker[i] != -1) // zone is being attacked
{
if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneInfo[i][zTeam] = ZoneAttacker[i];
GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
ZoneAttacker[i] = -1;
}
}
else // attackers failed to take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneAttacker[i] = -1;
}
}
else // check if somebody is attacking
{
for(new t=0; t < sizeof(Teams); t++) // loop all teams
{
if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
{
ZoneAttacker[i] = Teams[t];
ZoneAttackTime[i] = 0;
GangZoneFlashForAll(ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
}
}
}
}
}
public ZoneTimer()
{
for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
{
if(ZoneAttacker[i] != -1) // zone is being attacked
{
if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneInfo[i][zTeam] = ZoneAttacker[i];
GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
ZoneAttacker[i] = -1;
}
}
else // attackers failed to take over the zone
{
GangZoneStopFlashForAll(ZoneID[i]);
ZoneAttacker[i] = -1;
}
}
}
}
SetTimer("ZoneTimer", 1000, true);
SetTimer("ZoneTimer", 1000, true);