Фаталит карта при вызове функции GetConstructedStructure() или GetTriggeringUnit() в потоке триггера, который был вызван отловом события EVENT_PLAYER_UNIT_CONSTRUCT_FINISH.
Регистрация события идёт следующим образом:
library RegisterAnyUnitEvent initializer onInit
globals
private trigger array triggers
endglobals
function RegisterAnyUnitEvent takes playerunitevent whichPlayerUnitEvent, code actionFunc returns nothing
local integer index = GetHandleId(whichPlayerUnitEvent)
if (triggers[index] == null) then
set triggers[index] = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(0), whichPlayerUnitEvent, null)
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(1), whichPlayerUnitEvent, null)
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(2), whichPlayerUnitEvent, null)
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(3), whichPlayerUnitEvent, null)
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(4), whichPlayerUnitEvent, null)
call TriggerRegisterPlayerUnitEvent(triggers[index], Player(5), whichPlayerUnitEvent, null)
endif
call TriggerAddAction(triggers[index], actionFunc)
endfunction
endlibrary
Логи приложил.
Принятый ответ
ScopteRectuS, насколько я помню, эти 2 функции вызывают ошибку, если в параметре идентификатор героя.
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Ред. MpW
ничего не могу поделать. ждем умнейших
native GetUnitGoldCost takes integer unitid returns integer
))
Ред. Пушистый
Ред. scopterectus
Вернее когда этот юнит и эти функции встречаются с друг другом
.
мб потому близзы их и отрубили, что нашлись косяки и времени фиксить не было
в крайнем случае лично посмотрю
Ред. 8gabriel8
Ред. PT153