#Godot 4 CARD GAME Tutorial help

1 messages · Page 1 of 1 (latest)

honest rivet
#

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!

hushed mountain
honest rivet
honest rivet
hushed mountain
honest rivet
#

the card.dg is a node to get instantiated as a child from what I understand, yes

honest rivet
#

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

hushed mountain
#

I think I get it? Though where is Card.gd being run then?

honest rivet
#

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

hushed mountain
honest rivet
#

how and where would I put that? lol sorry

#

right under the .get_parent().connect_card_signals(self)

hushed mountain
honest rivet
#

when the error comes up it takes me to this line of code

hushed mountain
#

Just put it above the line that doesn't work

honest rivet
#

like this

#

?

hushed mountain
#

Put that in a print function

honest rivet
hushed mountain
#

For now comment out the none working line to get it to run

honest rivet
hushed mountain
#

There's your problem

#

One of them seems to be the child of Main

#

Which doesn't have the function it's looking for

honest rivet
#

everything has been a child of the main node

#

that is incorrect?

hushed mountain
#

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

honest rivet
#

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?

hushed mountain
honest rivet
#

Player Hand

#

Card Slot

#

I can paste it here, if youd like

hushed mountain
#

Sure just use proper formatting

clever valeBOT
#
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/

honest rivet
honest rivet