Godot 4 Multiplayer: Make Your Own Online Game

Hi,

After getting an error I noticed the version of the software changed as the lectures progressed. The first version is 4.1.3, and at the 46% completion mark, at the bottom of the screen of the instructor the version he was using was 4.2.1.

Maybe this is why I am getting the error? I am current stuck in this course.
My background is no longer visible after creating a node for a menu, renaming it UI,and clicking ‘Make Scene Root’. Need to view it from the 2D tab, you’ll see the background is not visible.

Any assistance is appreciated.

Thank you!




Hi,

Unfortunately out tagging system has not worked on this occasion and so its not letting me know which lecture this is.
If you can let us know the lecture this is on we may be able to tailor our replies a bit better.

The error you are getting is because the _on_player_disconnected method has no idea what the indentifier “id” is as its not been passed in.

Line 47 in your code should have the id passed in the parenthesis as below

func _on_player_disconnected(id):

Hope this helps and you can upgrade to 4.2.1 without any issues but there are not many changes to note and certainly i dont think any that affect this course.

2 Likes

I was able to correct the error. id typed in on line 47. How did I miss that!? :slight_smile:

The lecture is Godot 4 Multiplayer: Make Your Own Online Game - EARLY ACCESS.

I am on the lecture titled: Starting The Game.

Just after the 3:00 mark on video, mine background disappears. The lecturer’s does not. My inspector does not look the same either. This occurs after the instructor clicks and drags menu.gd from FileSystem window up to the Scene window. The menu.gd with the IP Line Edit and Status Label are not available.

Instructor’s screenshot:

My screenshot:

I see your Menu node is a Node2D, while Nathan’s is a white (Base) Node. As there are important differences between the two, that’s likely part of the problem =)

OK. I can I delete my Node2D and create Base Node?

Found it!

Right click, change type!

Having another issue.

My screenshot after dragging menu.gd up to menu. I don’t get the same access in the inspector as the instructor. Is the Godot version the issue? Halfway through the course the instructor seemed to switch from 4.1.3 to 4.2.1. I happened to notice once these current issues happened.

Instructor screenshot:

My screenshots:


As Marc said, the version change isn’t a big jump.

The missing “access” you’re referring to comes from the fact that Nathan’s script has two @export variables that are absent from yours. Carefully watch from 4:00 to about 4:20 and you should see everything you need =)

OK. Got it.

Just before the 4:00 mark, there some steps he does and I jus t want to make sure it does not matter before following steps from 4:00.

Instructor:

My screenshot
Looks different. Does not have the assign option in the Inspector.
Screenshot 2024-03-24 182348

I think what happened is Nathan introduced these lines in an earlier lecture and you missed them somehow. It’s all good.

The @export lines are what make those fields appear in the inspector; adding these lines and saving the script should make them appear right away, and conversely, their absence is exactly why you don’t see the fields right now. Try it and you’ll see.

2 Likes

Oh, OK. My bad. I think I get nervous because I want to learn this. I really appreciate everyone who helps. It is amazing!

I will give it a shot shortly.

Thank you!!!

1 Like

Everything worked!

I totally skipped the video before Starting The Game. Joining A Game.

Thanks again!

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms