I encountered an error about the structure again, and I don't know why it reports an error

I need to pass an array of tasks structs to the Loop_Task() function, but I have already defined each task. An error occurred when forming the tasks array,
This is the code for defining the struct task:

static __code DynamicLED_Params params1={hello,8,1,20};
static __code DynamicLED_Params params2={kunkun,8,8,15};
    
static  LoopFunction_t dmled1 ={Dynamic_MatrixLED,&params1,END};
static  LoopFunction_t dmled2 ={Dynamic_MatrixLED,&params2,END};

static  __code UartControl_Params uart_params={{&dmled1,&dmled2},2}; 
static  LoopFunction_t uart_task ={Uart1_MainFunction,&uart_params,RUNNING};

This is the code for defining struct array tasks:

static __code LoopFunction_t tasks[] =
    {
        dmled1,
        dmled2,
        uart_task
    };

This is a compile-time error message, always saying that I don’t have curly braces:

src\main.c:33: error 69: struct/union/array 'tasks': initialization needs curly braces

Why is that happening? I have tried many methods and keep getting errors

I have solved the above problem by another method, first setting tasks[2].param to NULL, then passing the struct tasks as tasks[2].param, and then the compilation was successful.
code:

static __code DynamicLED_Params params1={hello,8,1,20};
    static __code DynamicLED_Params params2={kunkun,8,8,15};
    static   LoopFunction_t tasks[3] ={
        {Dynamic_MatrixLED,&params1,END},
        {Dynamic_MatrixLED,&params2,END},
        {Uart1_MainFunction,NULL,RUNNING}
    };
    static TaskContext_t context = { tasks, 3 };
    tasks[2].params = &context;

    Task_init(context.tasks,3);

    Loop_Tasks();