Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions tutorials/scripting/gdscript/gdscript_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1651,13 +1651,20 @@ as a static type of the rest parameter:

::

func log_data(...values):
# ...

func other_func(...args):
func test_func(...args):
#log_data(...args) # This won't work.
log_data.callv(args) # This will work.

func log_data(...values):
# You should use `callv()` if you want to pass `values` as the argument list,
# rather than passing the array as the first argument.
prints.callv(values)
# You can use array concatenation to prepend/append the argument list.
write_data.callv(["user://log.txt"] + values)

func write_data(path, ...values):
# ...

Abstract functions
~~~~~~~~~~~~~~~~~~

Expand Down