This content has been marked as final. Show 4 replies
When secondsHandler() fires, it looks like cSeconds is null. The suspicious code is the AddChild tag. Why is that there? Are you using states? It may be a timing thing in that cSeconds hasn't yet been created when the first timer event fires.
I wonder if I should use an Exists command or just run it when the start starts, Im not sure what the proper standard would be , anyone have any idea ?
ps thank you for the response so far that makes sense and it gives me a direction to go
okay that made sense, I am now firing the function when the state runs however the problem now is if you go to the state more then once it will run the function again and again. does anyone know how to check if a function is running and then use an if statement to tell it to fire only if that function is not running ?
does that even make sense LOL
Just keep a flag to record whether you've been to state before. Initialize it to false at the beginning. Check the flag when you enter the state. If it's false, do whatever you need to and then set the flag to true.