godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.95k stars 3.22k forks source link

MultiplayerSpawner spawn() incorrectly defines parameter #9932

Open DMillerF opened 2 months ago

DMillerF commented 2 months ago

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

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