Having issues with Object:null. Not sure what's wrong.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OiKeTTLe

For some reason, in my project, my Timer is a null instance. It’s attached to the tree, everything is right and working, but my Timer isn’t recognised. I’ve tried making it an onready variable and printing the variable, but something weird happens; sometimes it shows the right thing (the timer), and other times it shows Object:null. No clue what’s happening. Any help would be appreciated.

:bust_in_silhouette: Reply From: Inces

It has to be onready.

I suspect You placed print code in weird place, that prints before ready() is signalled.
Or is there some condition that makes your timer queued free ?
It would be easier if You showed your code, pretty sure it is some tiny mistake

Hi, thanks for the response. It’s printing every idle frame, so I get consistent results. It’s very strange. It seems to both work but not work. There is nothing that queue_free’s my timer; it’s one shot and autostart is disabled. Here’s my code:

My Code

enter image description here

Results

OiKeTTLe | 2021-10-29 12:46

I’ll just leave the raw links to the images here:

Code:
Imgur: The magic of the Internet
Imgur: The magic of the Internet

Results:
Imgur: The magic of the Internet

OiKeTTLe | 2021-10-29 12:48