Error : Must be an array, map, or generator after ':' inside `for`

ComponentList := Entity.GetComponents()
for:
    Component:ComponentList
do:
    Print("done")


It does not work.

Seems to work for me:

Could you possibly show the function where the error arises?

using { /Verse.org }
using { /Verse.org/Native }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/SceneGraph }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }

A Verse-authored component that can be added to entities

mesh_collision_detection_component := class<final_super>(component):

Store the amount of damage to deal

DamageAmount : float = 900.0

OnSimulate<override>()<suspends>:void =
    if( SimEntity := Entity.GetSimulationEntity[] ):
        for (NiagaraEntity : SimEntity.FindDescendantEntitiesWithComponent(particle_system_component)):

            # Get the mesh component and ensure it has collision enabled
            if (MeshComp := mesh_component[NiagaraEntity]):
                set MeshComp.Queryable = true
                set MeshComp.Visible = true
                loop:
                    # Subscribe to entity entered events
                    CollisionEntity := MeshComp.EntityEnteredEvent.Await()

                    for:
                        Component: CollisionEntity.GetComponents()
                        FortCharacter := fort_character [Component]
                    do:
                        if(Player := player [FortCharacter.GetAgent[]]): 
                        FortCharacter.Damage (999.9)

                    Sleep(0.0)

Yep just checked and you’re right it doesnt work, seems to be an issue with the EntityEnteredEvent.Await() rather than the for

The digest states it should return an “entity” but it in fact seems to be returning $unknown