OBS Studio crashes with "timer_add"

oleg menkov

New Member
Hello everyone!
I have a problem with running a script in the OBS Studio
There is a "check_and_switch" function, and I want to call it every 3 seconds
When I call it in this way "check_and_switch()" - everything works properly (but the function is called once)
But when I write "obs.timer_add(check_and_switch, 3000)" instead, OBS Studio crashes, and I don't know how to fix it
Any help would be appreciated!