Hello,
i’m having a brain twister here and i’m losing my mind over it.
I have a rather simple script where i’m trying to call a built in function on a node and i’m getting the “Attempt to call function ‘queue_free’ in base ‘null instance’ on a null instance.” error.
Thing is, i’m having this error no matter what node i’m referencing on the first place.
I understand why it returns that error as “campaign_ui” has “null” for a value but given that i referenced if by dragging it on the script and pressing Ctrl while dropping it in, this makes no sense to me.
I used queue_free() as an example but any and every function called upon a node referenced in that way returns the same error. The only way i could make such a call work is buy calling a function on the Campaign_Manager node itself.
I suspect a pathing issue but i’m clueless on how to fix it as i never had any such issue when dragging + holding Ctrl to reference a node.
This is particularly frustrating as i have another scene setup exactly the same that works perfectly and i can’t spot any difference(s).
NB: the rest of the script is a bunch of empty functions and signals i have setup for later, here it is anyway if this is relevant: AgroCampaign_Game_Manager