【Question】What is a reason of Error on setting specified data of an array into a new variable?

Hi,
Let me question about the title Error.

As the following code, I would like to create “transform” type array and set one specified data into a new “transform” type variable.

However, when I try on my code, the following Error message is shown.
What is the reason of this Error?

Regards,

prop_teleport := class(creative_device):

    # This array has Trigger Device on the Level
    @editable
    TriggerCard : []trigger_device = array{}
    
    OnBegin<override>()<suspends>:void=
        # Get "transform" type data of each Trigger Device
        var CardPositions : []transform = 
            for(n := 0..TriggerCard.Length - 69):
                if (Prop := TriggerCard[n]):
                    Prop.GetTransform()
                else:
                    transform{}
        
        # I would like to set a specified data of the array into a new "transform" type variable.
		var PositionIndex : int = 0
        var NewPosition : transform = transform{}
        if(set NewPosition := CardPositions[PositionIndex]): # It causes Error: "The left hand side of this definition is an expression that cannot be defined."

The character for changing a variable is = not := which is asignment character (creating new variable)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.