So I create an object via a macro. Everything works well
    
    
    ecs.group players:
        comps: CHealth
        scope: public
    
    
    Run

this object has sequence of proc pointers. I can add action via macro
    
    
    ecs.group players:
        comps: CHealth
        scope: public
        event: handle_event
    
    proc handle_event*() =
        for e in players.added:
            log e
    
    
    Run

This proc is for handling entities events. The thing is that group players is 
treated as an undeclared identifier inside of handle_event.

But if I just manually define group like in code below everything works. 
    
    
    var g = Group()
    g.actions.add(handle_event)
    
    proc handle_event*() =
        for e in g.added:
            log e
    
    
    Run

What am I missing? I dumped astgen and pretty sure that wrote macro correctly

Reply via email to