Skip to content

Commit

Permalink
Document pick_random for empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
novalis committed Aug 18, 2023
1 parent a278c1b commit 30d4d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/classes/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
<method name="pick_random" qualifiers="const">
<return type="Variant" />
<description>
Returns a random value from the target array.
Returns a random value from the target array. Prints an error and returns [code]null[/code] if the array is empty.
[codeblocks]
[gdscript]
var array: Array[int] = [1, 2, 3, 4]
Expand Down

0 comments on commit 30d4d1c

Please sign in to comment.