yay finally ive done another script "BarbarianKiller" is the name the problem is Line 14: [Error] (13084:1): Duplicate identifier 'MSX1' in script. yes i know the problem

Originally Posted by
JAD
Now, if there's a variable or a procedure in SRL and you have SRL included in your script, if you try to call a procedure/function something which's name is already used in SRL, you will get a duplicated identifier with that. So you can't make a procedure named this in your script if you're including SRL.
but if i dont include SRL it comes with another error : unknown 'GameTab' identifier in the script .
what should i do?
SCAR Code:
{.Script Info:
# ScriptName = BarbarianKiller
# Author = Cazax
# Description = Kills barbarians in barb house
# Version = 0.5
# Date = 2008
# Comments = my second script :)
/Script Info}
program BarbKiller;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
var
HowManyKills,x,y : Integer;
MSX1, MSY1, MSX2, MSY2 : Integer;
foodlogout : boolean;
const
BarbarianColor = 1846843;
BarbariansToKill = 10;
EatFoodIfLowerHp = 6; // hp before eat
foodcolor = ; // fill in the food color if u are going to eat
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Booleans[0] := False; // are you going to eat food?
end;
procedure Starting;
begin
MakeCompass('S');
SetAngle(Low:Boolean);
GameTab(4)
end;
Procedure AniBann;
var
i : Integer;
begin
for i := 1 to 2 do
begin
case i of
1: PickUpMouse;
2: BoredHuman;
end;
end;
procedure AutoResponce;
begin
if (FindChatText('Hi'))then
begin
TypeSend('Ik spreek geen Engels')
if (FindChatText('Reported')then
begin
TypeSend('why?')
wait(3000+random(251))
DoEmote(1+random(17))
wait(1000+random(529))
TypeSend('Str lvl?')
end;
end;
end;
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
end;
end;
9: RC;
10: Respond;
end;
wait(1);
end;
end;
procedure FindForBarbarian;
begin
repeat
FindNormalRandoms;
if (FindColor(x,y,BarbarianColor,MSX1, MSY1, MSX2, MSY2)then
begin
if (IsUpText('barian'))then
begin
Mouse(x,y,1,1,true);
RealEatIfNeeded(foodcolor, eathp : integer; foodlogout);
OutFight;
until ( HowManyKills >= BarbariansToKill )
end;
end;
end;
begin
ActivateClient;
SetupSRL;
if (Not(LoggedIn)) then loginplayer;
Starting;
repeat
AntiBann;
AutoResponce;
FindFastRandoms;
FindForBarbarian;
until (false)
end.