The assignment's left hand expression type `player` cannot be assigned to (WEIRD)

Very strange issue here…

MM_device := class(creative_device):

    @editable
    MasterDevRef:master_device = master_device{}

    @editable
    var LobbyDevArray:[]lobby_device=array{}

    @editable
    TelePlayerTrigger:trigger_device:=trigger_device{}

    #Logic is if team is full/complete(true) array is chars on team
    var TeamMap: [int]tuple(logic,[]player) = map{}

    OnBegin<override>()<suspends>:void=
        TelePlayerTrigger.TriggeredEvent.Subscribe(TelePlayer)


    TelePlayer(Agent:?agent):void=
        if (Player := player[Agent?], Agent2:=Agent?):
            if(pIndex:=MasterDevRef.PInfoMap[Player]?.PlayerIndex):
                if(telep:=LobbyDevArray[pIndex].TeleporterArray[0], list:=LobbyDevArray[pIndex].PlayerList):
---->            if(set list[0] = Player):
                        telep.Teleport(Agent2)

im getting the error on the line with the arrow. Thing is, this is the array variable:

var PlayerList:[]player = array{}

i have var…

Considering ive literally done this exact thing in other projects with no problems, I Really need help with this one.

The ‘list’ variable you are using to assign the list to is a constant, regardless of the mutability of the underlying array variable. You might be better off setting it directly like:
set LobbyDevArray[pIndex].PlayerList[0] = Player
When I get home, I will double check that to make sure.