Auto-translated
Why isn't this piece of code working?while (contr==1) do
contr=0;
for i=1,95 do
if HasArtefact("geroy", i)==true then
RemoveArtefact("geroy", i);
if contr==0 then
contr=1;
end;
end;
end;
end;
More precisely, it works, but the game gets stuck in a loop and freezes. The idea is to remove all artifacts from the hero, taking into account that some may be duplicated.
for artefact = 1, 95 do
for n=1, GetHeroArtifactsCount("geroy", artefact) do
RemoveArtefact("geroy", artefact)
end
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4