Добавлен Radioactive
Не силен в кодинге помогите почему не работает эта функция
не работает именно то что не убирается бонус
не работает именно то что не убирается бонус
function EndB takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)
local unit c=LoadUnitHandle(BonusB,h,0)
local integer typ=LoadInteger(BonusB,h,2)
local integer i=LoadInteger(BonusB,h,1)
call AddBonus(c,-i,typ)
call DestroyTimer(t)
call FlushChildHashtable(BonusB,h)
endfunction
function AddB takes unit u,integer b,integer t,real ti returns nothing
local timer time=CreateTimer()
local integer h=GetHandleId(time)
call AddBonus(u,b,t)
call SaveUnitHandle(BonusB,h,0,u)
call SaveInteger(BonusB,h,1,b)
call SaveInteger(BonusB,h,2,t)
call TimerStart(CreateTimer(),ti,false,function EndB)
endfunction
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)
local unit c=LoadUnitHandle(BonusB,h,0)
local integer typ=LoadInteger(BonusB,h,2)
local integer i=LoadInteger(BonusB,h,1)
call AddBonus(c,-i,typ)
call DestroyTimer(t)
call FlushChildHashtable(BonusB,h)
endfunction
function AddB takes unit u,integer b,integer t,real ti returns nothing
local timer time=CreateTimer()
local integer h=GetHandleId(time)
call AddBonus(u,b,t)
call SaveUnitHandle(BonusB,h,0,u)
call SaveInteger(BonusB,h,1,b)
call SaveInteger(BonusB,h,2,t)
call TimerStart(CreateTimer(),ti,false,function EndB)
endfunction
Принятый ответ
не создана хештаблица BonusB, не определена функция AddBonus
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Нужно показать строчку где они инициализирована
Отредактирован Bornikkeny
10.1 Размещение нескольких вопросов в одном ресурсе.
При чём я бы рекомендовал начать сразу от сюда. xgm.guru/p/wc3/vjassmanual
Если вникнуть - сэкономишь себе кучу времени.