I am following Barry's Dev Hell Godot 4 CARD GAME Tutorial, on Episode 4 @ 8:40ish and receiving a error.
I am straight beginner to GameDev and Godot, I have attempted to research the error that I am receiving via google, comments on the video and the good ol ChatGPT.
Every suggestion has not worked.
Curious if someone would mind pointing out the obvious I a missing! Sorry for the inconvenience!
#Godot 4 CARD GAME Tutorial help
1 messages · Page 1 of 1 (latest)
Can you share tree structure?
.
Wait is Card.gd for a node that gets instantiated or is it for Card Slot
the card.dg is a node to get instantiated as a child from what I understand, yes
.
the Card Slot is suppose to be a "slot" for the card to be placed in and is a child of Card Manager as well.
all the code regarding the card.gd and cardslot.gd is primarily handed through the code within cardmanager.gd
or card slot is not a child and just utilizes code from card manager, I believe. I am sorry if I am making it confusing lol
So I am trying to call the card.tscn into existence but it is saying the connect_card_signals is not a valid Func but the Func does exist in Card Manager.gd
Can you add a print function to print the name of its parent, just want to see if it's parented correctly
how and where would I put that? lol sorry
right under the .get_parent().connect_card_signals(self)
In the ready function here above get parent
when the error comes up it takes me to this line of code
Line should be get_parent().name
Just put it above the line that doesn't work
Put that in a print function
There's your problem
One of them seems to be the child of Main
Which doesn't have the function it's looking for
No, it's fine
Problem is one of the cards your instantiating is the direct child of Main
So instead of it being the child of Card Manager who's the child of Main they're the child of simply Main
In short, one of the cards had the wrong parent
gotcha, I only have the Card.tscn. I may have made it a child off of main and not the Card Manager Node
is there a quick way to change that or recreate it?
For some reason an extra card is there that is a child of Main. Can you share PlayerHand.gd and CardSlot.gd
Player Hand
Card Slot
the card manager.gd is pretty long
I can paste it here, if youd like
Sure just use proper formatting
Embedding code in discord messages
Inline Code
When you surround some words with single backticks like `this`, it will be formatted as code.
Code Blocks
You can also include code blocks by surrounding the code with three backticks. If you add "swift" then you will also get basic syntax highlighting:
```swift
print("hello world")
```
Discord will then show it as a code block like this:
print("hello world")
Upload
If your code snippet is rather long, you can upload it to a text paste site. One option that supports syntax highlighting for GDScript is https://bpa.st/
I genuinely appreciate you talking your time to assist me with this issue! If i could, I would buy you a drink! lol