Arduino not reading nextion display sliders

Hi! I am trying to use a nextion display with an UNO, and I came across a problem, that I don't understand. I want to simply read the value of the slider, whenever I "release" it. Here is my code:

#include "Nextion.h"


NexSlider h0 = NexSlider(0, 3, "h0");

NexTouch *nex_listen_list[] = 

void h0PopCallback(void *ptr)
    uint32_t retval = 0;

    bool succes = h0.getValue(&retval);




      Serial.println("Could not read slider!");


void setup(void)

    h0.attachPop(h0PopCallback, &h0);
    dbSerialPrintln("setup done");

void loop(void)

The code can be compiled, but no matter how hard I tryed, it always sas:"Could not read slider!"
The grounds of the display and the UNO are connected, and the communication is working.(I have tryed a simple button, and that worked!)

Can anybody help? Thanks!