#Could someone explain what's going wrong here?

17 messages · Page 1 of 1 (latest)

dense geyser
#

Title, I'm in L5.P2 Challenge 1 of module 7 and I've just tried to add another button, I think the code for the button itself is sound but the game errors out as soon as I run, by the looks of the error it's because the %BackButton cannot be found, so I'm assuming my understanding of the shrotcut is wrong... Would someone be able to explain?

Thank you so much!

pine bramble
#

Weird, this seems to mean the node doesn't exist

#

But it still knows its full path of VBoxContainer/BackButton, so something is not working correctly

#

I think it's using the solutions scene, rather than your scene, somehow

#

Maybe an issue with those pesky UIDs in Godot 4

#

@hexed jacinth you've had to deal with UID issues, do you think this could be one of those problems?

dense geyser
#

I did compare an solution with my code for the practise and done some messing around, maybe me copying something has thrown an error somewhere..? I'll reset it and try again!

#

Hmmm, just rewrote the code entirely after resetting but still nothing

#

I'm assuming I've just broke something messing around with the solution file and copy/pastes! Should that code work OK though? I'll be content knowing that at least haha.

pine bramble
#

Yea, from looking at it, it should work perfectly fine.

full vector
#

Just asking because I don't see it mentioned: does the new button have a Scene Unique Name assigned via the node tree?

dense geyser
pine bramble
#

The error does mention the full path to the node (VBoxContainer/BackButton), so the node path is registered correctly as a scene unique node

full vector
#

Aah ok!

hexed jacinth
#

It's possible, if you're already using Godot 4.4, that this issue is linked to Godot 4.4's UIDs. However in general I wouldn't recommend modifying practices while the GDQuest practices dock is turned on, because this can cause the practice to fail or errors

#

If you want to make changes that are outside the scope of the practice, I recommend duplicating the practice folder, opening the duplicated scenes, and replacing the scripts with your new/extended scripts

#

(when you duplicate a folder in Godot, the scenes from the new folder will still point to the scripts from the original folder)