3. The function that assigns the city's name instead of the hero's name when the hero is in the city is not used, which could cause GetObjectPosition to throw an error.
if IsObjectExists("Olhar") == true then
x,y,p = GetObjectPosition("Olhar");
end;
There will be no error:
If the hero is in the city, then IsObjectExists("Olhar") ~= true, therefore, GetObjectPosition("Olhar") will not be called.
Added 1 minute ago
1. local x, y, p = 0;
-- is equivalent to --
local x = 0
local y = nil
local p = nil
-- and not --
local x = 0
local y = 0
local p = 0
I'll keep that in mind, but in this case, it's not important.
NHF 0.90 : NHF - группа в VK
Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...