Update on this, I have managed to get it not giving be red lines. However,
if (FirstPlayer := GetPlayspace().GetPlayers()[0]): / EndGame.Activate(FirstPlayer)
The slash is to make it do a new line just on this question.
The above though should work as FirstPlayer is player and not agent even though player is derived from agent class. How come this works but passing in MaybePlayer from the pizza tutorial if not done exacly how tutorial said it should be done didn’t work ?