godotengine / godotengine/godot-docs
MultiplayerSpawner spawn() incorrectly defines parameter
- 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:

**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