If anyone there still developing maps or just came around the Warcraft Zone.
Here is the question. I have a buff system using struct and hashtable, I found that quite efficient in terms of performance. But JassHelper would just say expected "Returns" pointing on that piece of code^
Here is a whole code for reference
Here is the question. I have a buff system using struct and hashtable, I found that quite efficient in terms of performance. But JassHelper would just say expected "Returns" pointing on that piece of code^
JASS:
function saveHash takes buffStr returns nothing
SaveInteger(udg_buffTable,GetHandleId(.u),.ba,buffStr)
endfunction
Here is a whole code for reference
JASS:
struct buffStr
unit u
timer t
real dur
integer ba //buffAbility
static method create takes unit whichUnit, real howLong, integer buffAbility returns buffStr
local buffStr bs = buffStr.allocate()
set bs.u = whichUnit
set bs.t = CreateTimer()
set bs.ba = buffAbility
set bs.dur = howLong
call TimerStart(bs.t,howLong,false,function removeBuff)
return bs
endmethod
endstruct
function saveHash takes buffStr returns nothing
SaveInteger(udg_buffTable,GetHandleId(.u),.ba,buffStr)
endfunction