14.01.2015, 14:29
i used this program for creating
and i have 10 errors
help fast +rep
Код:
******************/post/10721/Advanced_Capture_Zone_Creator_%5BUnique_and_useful!%5D/Jarnu/other/tool
help fast +rep
Код:
#include <streamer> //Important include you need to have streamer in-case you want this to work!
//Variables (Put them after your includes)
new iCP[MAX_PLAYERS];
new UnderAttack[30];
new Captured[30];
new CP[30];
new Zone[30];
new timer[MAX_PLAYERS][30];
new CountVar[MAX_PLAYERS] = 25;
new InCP[MAX_PLAYERS][30];
new CountTime[MAX_PLAYERS];
//=================================
new gTeam[MAX_PLAYERS]; //Team variable. ignore if you already got
#define TEAM_ARMY 0 //Ignore if you already got team defines
#define TEAM_TERRORIST 1 //Ignore if you already got team defines
#define TEAM_NONE 2 //Ignore if you already got team defines
#define ARMY_COLOR 0x375FFFFF
#define TERRORIST_COLOR 0xFF0000FF
//========Zone=Defines=============
#define Snakef 0
//=================================
//========OnGameModeInit Codes============
CP[Snakef] = CreateDynamicCP("-34.5398,2350.1331,24.3026,5,0,0,-1,25")
Zone[Snakef] = GangZoneCreate("-96,2280,48,2406")
UnderAttack[Snakef] = -1
Captured[Snakef] = -1
tCP[Snakef] = TEAM_NONE
//========== OnPlayerConnect codes ======
iCP[playerid] = -1;
InCP[playerid][GAS] = 0;
if(tCP[Snakef] == TEAM_ARMY) return GangZoneShowForPlayer(playerid, Zone[Snakef], 0x375FFFFF);
else if(tCP[Snakef] == TEAM_TERRORIST) return GangZoneShowForPlayer(playerid, Zone[Snakef], 0xFF0000FF);
//=========== OnPlayerDisconnect codes ==
if(InCP[playerid][Snakef] == 1)
{
UnderAttack[Snakef] = 0;
}
//==========================================
//==========OnPlayerDeath Codes===================
KillTimer(timer[playerid][Snakef]);
KillTimer(CountTime[playerid]);
UnderAttack[Snakef] = 0;
//==========================================
//=======OnPlayerEnterDynamicCP (Main codes!)===========
//You can just copy paste the following in-case you didn't got the call back defined already!
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP[Snakef])
{
if(UnderAttack[Snakef] == 1)
{
SendClientMessage(playerid, 0xFF0000FF,"This zone is already being captured!");
}
else if(gTeam[playerid] == tCP[Snakef])
{
SendClientMessage(playerid, 0xFF0000FF,"This zone is already being captured!");
}
else if(gTeam[playerid] == TEAM_NONE)
{
SendClientMessage(playerid, 0xFF0000FF,"You have no team so you cannot capture!");
}
else
{
UnderAttack[Snakef] = 1;
timer[playerid][Snakef] = SetTimerEx("SetCaptureZone", 25000, false,"i",playerid);
CountTime[playerid] = SetTimerEx("CountDown", 1, false,"i", playerid);
iCP[playerid] = Snakef;
InCP[playerid][Snakef] = 1;
Captured[Snakef] = 0;
if(gTeam[playerid] == TEAM_ARMY)
{
GangZoneFlashForAll(Zone[Snakef], ARMY_COLOR);
}
else if(gTeam[playerid] == TEAM_TERRORIST)
{
GangZoneFlashForAll(Zone[Snakef], TERRORIST_COLOR);
}
new string[128], name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s is trying to capture theSnakef",name);
SendClientMessageToAll(ARMY_COLOR, string);
}
}
return 1;
}
//================================OnPlayerLeaveDynamicCP codes=============================
//You can just copy paste the following in-case you didn't got the call back defined already!
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP[Snakef])
{
if(Captured[Snakef] == 1)
{
GangZoneStopFlashForAll(Zone[Snakef]);
UnderAttack[Snakef] = 0;
InCP[playerid][Snakef] = 0;
tCP[Snakef] = gTeam[playerid];
if(gTeam[playerid] == TEAM_ARMY)
{
GangZoneShowForAll(Zone[Snakef], ARMY_COLOR);
}
else if(gTeam[playerid] == TEAM_TERRORIST)
{
GangZoneShowForAll(Zone[Snakef], TERRORIST_COLOR);
}
KillTimer(timer[playerid][Snakef]);
KillTimer(CountTime[playerid]);
}
else if(Captured[Snakef] == 0)
{
SendClientMessage(playerid, TERRORIST_COLOR,"You have left the flag you have failed to capture the zone!");
UnderAttack[Snakef] = 0;
InCP[playerid][Snakef] = 0;
GangZoneStopFlashForAll(Zone[Snakef]);
KillTimer(timer[playerid][Snakef]);
KillTimer(CountTime[playerid]);
}
}
return 1;
}
//======================SetCaptureZone function!====================
//You can just copy paste the following under the above callback!
forward SetCaptureZone(playerid);
public SetCaptureZone(playerid)
{
if(iCP[playerid] == Snakef)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+5);
GivePlayerMoney(playerid, 5000);
SendClientMessage(playerid, ARMY_COLOR,"Congratulations! You have successfully captured the Gas Station! You earned +5 scores and +$5000!");
tCP[Snakef] = gTeam[playerid];
if(gTeam[playerid] == TEAM_ARMY)
{
GangZoneShowForAll(Zone[Snakef], ARMY_COLOR);
}
else if(gTeam[playerid] == TEAM_TERRORIST)
{
GangZoneShowForAll(Zone[Snakef], TERRORIST_COLOR);
}
GangZoneStopFlashForAll(Zone[Snakef]);
Captured[Snakef] = 1;
KillTimer(CountTime[playerid]);
KillTimer(timer[playerid][Snakef]);
}
return 1;
}
//====================CountTime Function======================
//You can just copy paste the following under the above function!
forward CountDown(playerid);
public CountDown(playerid)
{
CountVar[playerid]--;
if(CountVar[playerid] == 0)
{
CountVar[playerid] = 25;
KillTimer(CountTime[playerid]);
}
else
{
new str[124];
format(str, sizeof(str),"~n~~n~~n~~n~~n~~n~~r~%d/~y~25 ~w~Seconds left~n~~g~to capture", CountVar[playerid]);
GameTextForPlayer(playerid, str, 1000, 3);
}
CountTime[playerid] = SetTimerEx("CountDown", 1000, false,"i", playerid);
return 1;
}
//-------------Capture Zone Codes Created using J_Capture Zone tool!-----------//
Код:
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(23) : error 010: invalid function or declaration D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(29) : error 010: invalid function or declaration D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(31) : error 010: invalid function or declaration D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(32) : error 010: invalid function or declaration D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(34) : error 010: invalid function or declaration D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(40) : error 021: symbol already defined: "KillTimer" D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(54) : error 017: undefined symbol "tCP" D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(54) : warning 215: expression has no effect D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(54) : error 001: expected token: ";", but found "]" D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(54) : error 029: invalid expression, assumed zero D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\snakef.pwn(54) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors.


: error 010: invalid function or declaration