initProperties(); not compiling

The default sketch I obtained from the Arduino IoT cloud which included initProperties(); used to compile. Now, it does not. I remove initProperties(); and it compiles, but when I leave it in, it doesn't.

How do I fix this?
Thanks in advance.
Error code: Arduino: 1.8.13 (Mac OS X), Board: "Arduino MKR1000"

In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
sketch/thingProperties.h: In function 'void initProperties()':
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void ()(), float, void ()(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
#define addProperty( v, ...) addPropertyReal(v, #v, VA_ARGS)
^
sketch/thingProperties.h:23:16: note: in expansion of macro 'addProperty'
ArduinoCloud.addProperty(average, READWRITE, ON_CHANGE, onAverageChange);
^~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:109:10: note: declared here
void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) attribute((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
^~~~~~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (
)(), float, void ()(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
#define addProperty( v, ...) addPropertyReal(v, #v, VA_ARGS)
^
sketch/thingProperties.h:24:16: note: in expansion of macro 'addProperty'
ArduinoCloud.addProperty(lightVal, READ, 600 * SECONDS, NULL);
^~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:109:10: note: declared here
void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) attribute((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
^~~~~~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (
)(), float, void (
)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
#define addProperty( v, ...) addPropertyReal(v, #v, VA_ARGS)
^
sketch/thingProperties.h:25:16: note: in expansion of macro 'addProperty'
ArduinoCloud.addProperty(reccomendedLight, READWRITE, ON_CHANGE, onReccomendedLightChange);
^~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:109:10: note: declared here
void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) attribute((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
^~~~~~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (
)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
#define addProperty( v, ...) addPropertyReal(v, #v, VA_ARGS)
^
sketch/thingProperties.h:26:16: note: in expansion of macro 'addProperty'
ArduinoCloud.addProperty(soilVal, READ, 600 * SECONDS, NULL);
^~~~~~~~~~~
In file included from sketch/thingProperties.h:3:0,
from /Users/dportas/Desktop/programming/Arduino/PlantSitter_nov07a/PlantSitter_nov07a.ino:19:
/Users/dportas/Documents/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:109:10: note: declared here
void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) attribute((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
^~~~~~~~~~~~~~~
sketch/PlantSitter_nov07a.ino.cpp.o: In function initProperties()': sketch/thingProperties.h:28: undefined reference to onAverageChange()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino MKR1000.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

hi @orangeplayer

from the last lines of the command I see that

sketch/PlantSitter_nov07a.ino.cpp.o: In function `initProperties()'
sketch/thingProperties.h:28: undefined reference to `onAverageChange()'

you may have removed the callback from the main .ino file.
Please post the entire code in order for someone to help you out
thanks
ubi