I have the following in Includes.txt
// All files specified below here will be
// compiled for use with any SoldatServer
// Scripts. Use // to mark a comment.
// Manual:
// http://enesce.com/help/
//SocketCore.pas
//NetworkCore.pas
//AdminCore.pas
admin.pas
//nextmapvote.pas
Medic.pas
and when I try to start the server it gives this error:
08-02-26 14:55:48 [*] default -> [Error] (171:3): Duplicate identifier ''
What does it mean?
Here is my Medic.pas
const
Color = $FFFFFFFF;
MaxDist = 65;
MaxHealth = 65;
HealRate = 8;
var
Medic: array[1..2] of byte;
procedure AppOnIdle(Ticks: integer);
var
i,j: byte;
X,Y: single;
begin
for i := 1 to 2 do begin
GetPlayerXY(Medic[i],X,Y);
if Medic[i] <> 0 then if GetPlayerStat(Medic[i],'Alive') = true then for j := 1 to 32 do if (GetPlayerStat(j,'Active') = true) and (GetPlayerStat(j,'Alive') = true) and (GetPlayerStat(Medic[i],'Team') = GetPlayerStat(j,'Team')) and (Distance(X,Y,GetPlayerStat(j,'X'),GetPlayerStat(j,'Y')) <= MaxDist) and (GetPlayerStat(j,'Health') < MaxHealth) then begin
if GetPlayerStat(j,'Health') + HealRate > MaxHealth then DoDamage(j,GetPlayerStat(j,'Health') - MaxHealth) else DoDamage(j,-HealRate);
end;
end;
end;
procedure OnJoinGame(ID, Team: byte);
begin
if Medic[Team] = 0 then WriteConsole(ID,'Medic is up for grabs on your team. Type !medic to claim it.',Color);
end;
procedure OnJoinTeam(ID, Team: byte);
var
OTeam: byte;
begin
if Team = 1 then OTeam := 2 else OTeam := 1;
if Medic[OTeam] = ID then begin
Medic[OTeam] := 0;
WriteConsole(0,'Medic for team #' + InttoStr(OTeam) + ' is up for grabs. Type !medic to claim it.',Color);
end;
end;
procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
if Medic[Team] = ID then begin
Medic[Team] := 0;
WriteConsole(0,'Medic for team #' + InttoStr(Team) + ' is up for grabs. Type !medic to claim it.',Color);
end;
end;
procedure OnMapChange(NewMap: string);
var
i: byte;
begin
for i := 1 to 2 do Medic[i] := 0;
WriteConsole(0,'Medic is now up for grabs for both teams. Type !medic to claim it.',Color);
end;
procedure OnPlayerSpeak(ID: byte; Text: string);
var
Team: byte;
begin
if (Text = '!medic') then begin
Team := GetPlayerStat(ID,'Team');
if Medic[Team] = 0 then begin
Medic[Team] := ID;
WriteConsole(ID,GetPlayerStat(ID,'Name') + ' has claimed medic for team #' + InttoStr(Team) + '.',Color);
end else WriteConsole(ID,'Medic has already been claimed by ' + GetPlayerStat(Medic[Team],'Name') + '.',Color);
end;
end;