my_time <- 0;
try {my_time = my_config["_msgs"].tointeger();} catch(e) {}
You are declaring a global variable my_time of the value 0. Trying to store another value, converting to integer, into my_time. Catch error should that expression fail.
local my_time = my_config["_msgs"].tointeger();
Declare a local variable my_time the value of another value, converting to integer.
I understand what you are trying to do. Use a local value inside a try/catch block. When you catch the error, print to console and set a default value. This is what I do. Or screw em. Depends on how much „fail proofing“ you want to do. I try to assume that the users are dumb as a door knob. With rpi „images“ being a thing now, my attitude is pretty spot on with results.