Macro name must be an identifier?

Hi, I was trying to grant the next weapon to the player who killed the guard.

I believe I’ve sorted it (tested in-game and it worked)

What I did was the following:

    PVEKilled(Result:device_ai_interaction_result):void=
        Print ("Guard Killed")
        Killer := Result.Source
        if (FortCharacter := Killer?):
                GrantNextWeapon(FortCharacter)

The thing I’m unsure of now is whether that would give the next weapon to all players, or just the one who killed the guard.

Also with regards to your suggestion, putting just GrantNextWeapon(Killer) throws an error of “This function parameter expects a value of type agent, but this argument is an incompatible value of type ?agent.”.

Thanks!