function not declared in the scope

I have no idea why it works on one and not the other. Both of them should have, at the top

#include <Arduino.h>