Null when compare int to int

Godot Version

4.3

Question

Help, please. I can’t figure out what could be causing this strange behavior. I can see in the debugger that it’s 1. But comparing int to int gives null. If I access property via get, the comparison works correctly. I’ve been struggling for half a day, I couldn’t figure out what is wrong. (

print(myobject.myvalue) # 1
print(myobject.myvalue ==1) # null print(myobject.get(“myvalue”)==1) # true

What is myobject, and what is myvalue exactly? You probably have to show more code.

2 Likes

This is my class that inherits Node. Part of a state machine.
But the way I implemented it, I have classes referencing each other. Maybe that’s the point? I’ve read here that it’s not recommended to do that in Godot:

Share the code of your class please.

2 Likes

Thanks everyone. I started rewriting the entire structure and at the same time decided to look at all the warnings in the debugger.
And I saw a message about an error calling a non static method, which does not interrupt the process and does not critically affect anything in the logic.
After that, the links break.

static var anim_queue_started: bool:
get = _get_anim_queue_started

func _get_anim_queue_started() → bool:
return Game.GameBoard._animation_is_queuing