Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Неполадки в скрипте...

тут можно задать вопрос по скриптингу
Post Reply
NoSmoking
Posts: 6
Joined: 27.11.2006 19:23
Contact:

Неполадки в скрипте...

Post by NoSmoking »

Вот собсно взял к скрипту на спарринг добавил функцию проверки на вепон из другого скрипта , но чтото не сходиться , выдает:
15:48:16 [Banka]: Compiling
15:48:16 [Banka]: Compiler: [Error] (sparringVeterinary.txt at 14:1): Identifier expected
15:48:16 [Banka]: Compiling failed


Возможно я чегото не усмотрел , подскажите кто знает в чем трабла... Лтбо просьба скинуть суда любую работающую переодевалку.Зараннее спасибо... :oops: :cry:

сам скрипт:

Code: Select all

program Sparing;
Var CleanBandag, weapon, BloodyBandages, Target : Cardinal;
procedure CleanBandages;
var WaterTrought : Cardinal;
Begin
weapon := $0F51; {Dagger}
BloodyBandages := $0E20;
WaterTrought := $4005615F; // ID корыта с водой
FindType(BloodyBandages,BackPack);
UseObject(FindItem);
WaitForTarget(5000);
If TargetPresent then

procedure weaponckeck;
begin
if (not dead) and (connected) then begin
checksave;
if (getquantity(findtype(weapon,ground)) > 0) and (gettype(ObjAtLayer(RhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(RHandLayer);
wait(500);
Equip(RhandLayer,finditem);
end;
Wait(3000);
checksave;
if (getquantity(findtype(weapon,ground)) > 0) and (gettype(ObjAtLayer(LhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(LHandLayer);
wait(500);
Equip(LhandLayer,finditem);
end;
end;
end;

begin
TargetToObject(WaterTrought);
end;
End;
Begin
While True do
begin
CleanBandag := $0E21;
BloodyBandages := $0E20;
Target := $000783DD; // ID соперника
If (WarMode = false) then
begin
SetWarMode(true);
end;
Attack(Target);
FindType(CleanBandag, BackPack);
UseObject(FindItem);
WaitForTarget(5000);
If TargetPresent then
begin
TargetToObject(Self);
end;
Wait(3000);
If Count(BloodyBandages) >= 50 then
begin
CleanBandages;
end;
end;
End.
вставил етот вот кусок , и добавил переменную "weapon"

Code: Select all

procedure weaponckeck;
begin
if (not dead) and (connected) then begin
checksave;
if (getquantity(findtype(weapon,ground)) > 0) and (gettype(ObjAtLayer(RhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(RHandLayer);
wait(500);
Equip(RhandLayer,finditem);
end;
Wait(3000);
checksave;
if (getquantity(findtype(weapon,ground)) > 0) and (gettype(ObjAtLayer(LhandLayer)) <> gettype(finditem)) then begin
addtosystemjournal('Weapon Change, осталось '+inttostr(findcount));
UnEquip(LHandLayer);
wait(500);
Equip(LhandLayer,finditem);
end;
end;
end;
CFA
Developer
Developer
Posts: 492
Joined: 20.04.2006 6:03
Contact:

Re: Неполадки в скрипте...

Post by CFA »

ты этот кусок воткнул в середину другой процедуры.
WaitForTarget(5000);
If TargetPresent then


procedure weaponckeck;
begin
if (not dead) and (connected) then begin
Post Reply