[VERSE] How to Connect a PlayerCounter with a Function?

Im making a function that enable a button and prop manipulator but i have some issues to expres the (Player:player) , How can I fix it?

@editable
    Comida_para2: player_counter_device:= player_counter_device{}

OnBegin<override>()<suspends>:void=
        Comida_para2.CountSucceedsEvent.Subscribe(Activar_comidas1)

 Activar_comida1(Player:player): void =
        Comida1_B.Enable()
        Comida1_P.ShowProps()
        Comida2_B.Enable()
        Comida2_P.ShowProps()


#not full code

So the CountSucceedsEvent does not return any arguments, no “Player:player”. However what you might be looking for is the CountedEvent, which does return an agent. I believe you can then probably cast the agent to a player using this:

if(Player := player[agent]): 

…though I haven’t tested that. You might want to just call agent.GetFortCharacter() instead.