Skip to content
User Avatar
#3670
Auto-translated
Martha

The Editor is giving an error on the line:
if GetHeroName(defH) == "Nur" and GetHeroName(attH) = "Shadwyn" then

If you write:
if defH then
if GetHeroName(defH) == "Nur" and GetHeroName(attH) = "Shadwyn" then
then it gives an error on the line if defH then.

I understand that I'm being slow, but I can't help it. Answer when you have time, it's not urgent for me.

Specifically, the error here is because GetHeroName(attH) = "Shadwyn" contains one equals sign, but it should be two.
Read the guides in the Khottabych group; combat scripts are not the simplest thing in Heroes. I, for example, with sufficient experience in writing global map scripts, won't be able to help you much - because I don't have experience writing combat scripts, I might give you bad advice.


Не уходи безропотно во тьму,
Будь яростней пред ночью всех ночей,
Не дай погаснуть свету своему!

Хоть мудрый знает – не осилишь тьму
Во мгле словами не зажжёшь лучей –
Не уходи безропотно во тьму.