Jasshelper says for this, that Plague[hero] isn't an array, but I'm running PUI in the struct, there should be no error :S
JASS:
private struct Plague
unit hero
integer ticks
static method create takes unit u returns thistype
local thistype this = thistype.allocate()
set .hero = u
return this
endmethod
//!runtextmacro PUI()
endstruct
private function LearnActions takes nothing returns nothing
local unit hero = GetTriggerUnit()
local integer index = GetUnitIndex(hero)
if Plague[hero] == 0 then //This line is the one jasshelper doesn't like
set Plague[hero] = Plague(Plague[index]).create(hero)
endif
endfunction