I’m using a subscribe in elimination manager device
but when it’s Agent:agent I got the error (title)
docs clearly say that I have to use Agent:agent but I just can’t, so how am I suppost to use the device?
It requires the type ?agent
as parameter. You’ll need to cast it to agent
inside your function if PlayersMap
has agent
as key, so that’d be
EliminationManager.EliminationEvent.Subscribe(KillerElimination)
KillerElimination(MaybeAgent:?agent):void=
if(Agent := MaybeAgent?, CP :CustomPlayer = PlayersMap[Agent]):
# Your code
1 Like