godotengine / godotengine/godot-docs

MultiplayerSpawner spawn() incorrectly defines parameter

Open
#9,932 0 comments 0 reactions 0 assignees View on GitHub
area:class reference bug
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
4.3

**Issue description:**
The defined function `spawn` for MultiplayerSpawner lists the parameters as `(data: Variant = null)`. However, this parameter is not optional, and a default value will never be used. It is unclear if the parameter is intended to be optional, but current implementation results in it being a requirement for any Callable assigned to spawn_function

Failing to provide a value for `data` results in the following misleading error:
![image](https://github.com/user-attachments/assets/9628e58d-ce63-4642-8f66-7846e7f3d2a4)

**URL to the documentation page:**
https://docs.godotengine.org/en/4.3/classes/class_multiplayerspawner.html

If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the MultiplayerSpawner class reference at the linked documentation page and inspect the documented spawn(data: Variant = null) signature. Compare the documented parameter behavior with the reported spawn_function Callable requirement, then update the class reference so the signature and requirement are accurate.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.