How to pass values through a function from a slider to a Screen Label

I have a problem: I have a small project, a Screen1 which, among other things, contains a Slider and a Label. I want that when the Slider moves, its value in the range is displayed in a Label (Label3 from the same screen) but through the Call Function event, not through the Value Changes trigger - SET TEXT VALUE FROM with the Label3 target (set through the application interface) .
Here is the function from ui.c with the reason:

void ui_event_Screen1_Slider2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(s);
lv_obj_t * target = lv_event_get_target(s);
if (event_code == LV_EVENT_VALUE_CHANGED) {
color_doi(s);
}
}

and in ui_events.c I have:
#include “ui.h”

void color_doi(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(s);
lv_obj_t * target = lv_event_get_value(s);
if (event_code == LV_EVENT_VALUE_CHANGED) {
_ui_slider_set_text_value(ui_Screen1_Label3, target, “”, “5”);
}
}

I move the slider (that is, I change its value), but the value of Label3 remains unchanged. Can you help me with an advice, some settings need to be made that I don’t know.

There are arguments named ‘s’ in your lv_event_get_code and lv_event_get_target and color_doi calls instead of ‘e’. I guess they’re just typos, they really need to be ‘e’, the name of the event variable the callbacks receive as parameter. Also in the color_doi function you need to use lv_event_get_target(e) and not lv_event_get_value to get the value source widget which is the slider the event was generated by. ( _ui_slider_text_value() function needs an object, not a direct value.)