C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(309) : error 021: symbol already defined: "Mode"
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(548) : error 028: invalid subscript (not an array or too many subscripts): "Mode"
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(548) : warning 215: expression has no effect
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(548) : error 001: expected token: ";", but found "]"
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(548) : error 029: invalid expression, assumed zero
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(548) : fatal error 107: too many error messages on one line
function StartMap()
{
foreach(Player,i) //I can't find any function, stock or public forward that called Player?
{
if(Mode[i] == 1)
{
DisablePlayerCheckpoint(i);
GameMinutes =4;
GameSeconds =59;
TogglePlayerSpectating(i,0);
air[i] = 1;
eopen = 1;
evaced[i] = 0;
roundkills[i] = 0;
roundxp[i] = 0;
pInfo[i][pRCcars] = 2;
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
CurePlayer(i);
SetPlayerDrunkLevel(i,0);
pInfo[i][Boxes] = 0;
pInfo[i][BoxesAdvanced] = 0;
pInfo[i][pVipBoxes] = 3;
pInfo[i][pLadders] = 0;
pInfo[i][C4] = 2;
pInfo[i][pDoctorShield] = 1;
pInfo[i][pMapsPlayed]++;
DestroyPickup(meatDrops[i]);
DestroyObject(DocShield);
TextDrawHideForPlayer(i, Textdraw0);
TextDrawHideForPlayer(i, Textdraw1);
TextDrawHideForPlayer(i, Textdraw2);
TextDrawHideForPlayer(i, Textdraw3);
TextDrawHideForPlayer(i, Textdraw4);
TextDrawHideForPlayer(i, Textdraw5);
TextDrawHideForPlayer(i, Textdraw6);
TextDrawHideForPlayer(i, Textdraw7);
TextDrawHideForPlayer(i, Textdraw8);
TextDrawHideForPlayer(i, Textdraw9);
TextDrawHideForPlayer(i, Textdraw10);
TextDrawHideForPlayer(i, Textdraw12);
TextDrawHideForPlayer(i, Textdraw13);
TextDrawHideForPlayer(i, Textdraw14);
TextDrawHideForPlayer(i, Textdraw15);
TextDrawHideForPlayer(i, Textdraw16);
TextDrawHideForPlayer(i, Textdraw17);
TextDrawHideForPlayer(i, Textdraw18);
TextDrawHideForPlayer(i, Textdraw19);
TextDrawHideForPlayer(i, Textdraw20);
TextDrawHideForPlayer(i, Textdraw21);
TextDrawHideForPlayer(i, Textdraw22);
TextDrawHideForPlayer(i, Textdraw23);
TextDrawHideForPlayer(i, Textdraw24);
TextDrawHideForPlayer(i, Textdraw25);
TextDrawHideForPlayer(i, Textdraw26);
TextDrawHideForPlayer(i, Textdraw27);
hellspawn = 0;
SetCameraBehindPlayer(i);
TogglePlayerControllable(i,1);
new IP[22]; // Creating a new string called IP with the maximum length of 22.
GetPlayerIp(i, IP, sizeof(IP));
new INI:File = INI_Open(UserPath(i));
INI_SetTag(File,"data");
INI_WriteString(File, "Ip", IP); // We're writing in the .ini file of the player a new line which will contain our string "IP", so it'll look like "Ip = IP String here". If my IP was for example "127.0.0.1" then it'll be "Ip = 127.0.0.1".
INI_Close(File);
spec[i] = 0;
}
}
time1 = MAX_MAPTIME;
SetWeather(Map[Weather]);
SetWorldTime(Map[Time]);
UpdateMapName();
SetTimer("SetAllHuman",1000,false);
gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
return 1;
}
function StartMap()
{
foreach(MAX_PLAYERS,i)
{
if(Mode[i] == 1)
{
DisablePlayerCheckpoint(i);
GameMinutes =4;
GameSeconds =59;
TogglePlayerSpectating(i,0);
air[i] = 1;
eopen = 1;
evaced[i] = 0;
roundkills[i] = 0;
roundxp[i] = 0;
pInfo[i][pRCcars] = 2;
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
CurePlayer(i);
SetPlayerDrunkLevel(i,0);
pInfo[i][Boxes] = 0;
pInfo[i][BoxesAdvanced] = 0;
pInfo[i][pVipBoxes] = 3;
pInfo[i][pLadders] = 0;
pInfo[i][C4] = 2;
pInfo[i][pDoctorShield] = 1;
pInfo[i][pMapsPlayed]++;
DestroyPickup(meatDrops[i]);
DestroyObject(DocShield);
TextDrawHideForPlayer(i, Textdraw0);
TextDrawHideForPlayer(i, Textdraw1);
TextDrawHideForPlayer(i, Textdraw2);
TextDrawHideForPlayer(i, Textdraw3);
TextDrawHideForPlayer(i, Textdraw4);
TextDrawHideForPlayer(i, Textdraw5);
TextDrawHideForPlayer(i, Textdraw6);
TextDrawHideForPlayer(i, Textdraw7);
TextDrawHideForPlayer(i, Textdraw8);
TextDrawHideForPlayer(i, Textdraw9);
TextDrawHideForPlayer(i, Textdraw10);
TextDrawHideForPlayer(i, Textdraw12);
TextDrawHideForPlayer(i, Textdraw13);
TextDrawHideForPlayer(i, Textdraw14);
TextDrawHideForPlayer(i, Textdraw15);
TextDrawHideForPlayer(i, Textdraw16);
TextDrawHideForPlayer(i, Textdraw17);
TextDrawHideForPlayer(i, Textdraw18);
TextDrawHideForPlayer(i, Textdraw19);
TextDrawHideForPlayer(i, Textdraw20);
TextDrawHideForPlayer(i, Textdraw21);
TextDrawHideForPlayer(i, Textdraw22);
TextDrawHideForPlayer(i, Textdraw23);
TextDrawHideForPlayer(i, Textdraw24);
TextDrawHideForPlayer(i, Textdraw25);
TextDrawHideForPlayer(i, Textdraw26);
TextDrawHideForPlayer(i, Textdraw27);
hellspawn = 0;
SetCameraBehindPlayer(i);
TogglePlayerControllable(i,1);
new IP[22]; // Creating a new string called IP with the maximum length of 22.
GetPlayerIp(i, IP, sizeof(IP));
new INI:File = INI_Open(UserPath(i));
INI_SetTag(File,"data");
INI_WriteString(File, "Ip", IP); // We're writing in the .ini file of the player a new line which will contain our string "IP", so it'll look like "Ip = IP String here". If my IP was for example "127.0.0.1" then it'll be "Ip = 127.0.0.1".
INI_Close(File);
spec[i] = 0;
}
}
time1 = MAX_MAPTIME;
SetWeather(Map[Weather]);
SetWorldTime(Map[Time]);
UpdateMapName();
SetTimer("SetAllHuman",1000,false);
gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
return 1;
}
I didn't get you what you are doing in this line:
PHP код:
PHP код:
|
Actually it is fine as it is, you can define that as foreach(new i : Player) too, but I don't think the problem is there.
Anyways, can you post only the line that gives you error and not the whole script? Because I'm too lazy to download it and look at the code, get includes and stuff. |
function StartMap()
{
foreach(MAX_PLAYERS,i)
{
if(Mode[i] == 1) // Getting error on this line
{
DisablePlayerCheckpoint(i);
GameMinutes =4;
GameSeconds =59;
TogglePlayerSpectating(i,0);
air[i] = 1;
eopen = 1;
evaced[i] = 0;
roundkills[i] = 0;
roundxp[i] = 0;
pInfo[i][pRCcars] = 2;
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
CurePlayer(i);
SetPlayerDrunkLevel(i,0);
pInfo[i][Boxes] = 0;
pInfo[i][BoxesAdvanced] = 0;
pInfo[i][pVipBoxes] = 3;
pInfo[i][pLadders] = 0;
pInfo[i][C4] = 2;
pInfo[i][pDoctorShield] = 1;
pInfo[i][pMapsPlayed]++;
DestroyPickup(meatDrops[i]);
DestroyObject(DocShield);
TextDrawHideForPlayer(i, Textdraw0);
TextDrawHideForPlayer(i, Textdraw1);
TextDrawHideForPlayer(i, Textdraw2);
TextDrawHideForPlayer(i, Textdraw3);
TextDrawHideForPlayer(i, Textdraw4);
TextDrawHideForPlayer(i, Textdraw5);
TextDrawHideForPlayer(i, Textdraw6);
TextDrawHideForPlayer(i, Textdraw7);
TextDrawHideForPlayer(i, Textdraw8);
TextDrawHideForPlayer(i, Textdraw9);
TextDrawHideForPlayer(i, Textdraw10);
TextDrawHideForPlayer(i, Textdraw12);
TextDrawHideForPlayer(i, Textdraw13);
TextDrawHideForPlayer(i, Textdraw14);
TextDrawHideForPlayer(i, Textdraw15);
TextDrawHideForPlayer(i, Textdraw16);
TextDrawHideForPlayer(i, Textdraw17);
TextDrawHideForPlayer(i, Textdraw18);
TextDrawHideForPlayer(i, Textdraw19);
TextDrawHideForPlayer(i, Textdraw20);
TextDrawHideForPlayer(i, Textdraw21);
TextDrawHideForPlayer(i, Textdraw22);
TextDrawHideForPlayer(i, Textdraw23);
TextDrawHideForPlayer(i, Textdraw24);
TextDrawHideForPlayer(i, Textdraw25);
TextDrawHideForPlayer(i, Textdraw26);
TextDrawHideForPlayer(i, Textdraw27);
hellspawn = 0;
SetCameraBehindPlayer(i);
TogglePlayerControllable(i,1);
new IP[22]; // Creating a new string called IP with the maximum length of 22.
GetPlayerIp(i, IP, sizeof(IP));
new INI:File = INI_Open(UserPath(i));
INI_SetTag(File,"data");
INI_WriteString(File, "Ip", IP); // We're writing in the .ini file of the player a new line which will contain our string "IP", so it'll look like "Ip = IP String here". If my IP was for example "127.0.0.1" then it'll be "Ip = 127.0.0.1".
INI_Close(File);
spec[i] = 0;
}
}
time1 = MAX_MAPTIME;
SetWeather(Map[Weather]);
SetWorldTime(Map[Time]);
UpdateMapName();
SetTimer("SetAllHuman",1000,false);
gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
return 1;
}
new Mode[MAX_PLAYERS];
new Mode[MAX_PLAYERS];
can you post only the line that gives you error and not the whole script
|
C:\Users\mitko\Desktop\Zombie\gamemodes\zm.pwn(309 ) : error 021: symbol already defined: "Mode" |