Skip to content

Commit

Permalink
Merge pull request #80694 from novalis/pick-random-null
Browse files Browse the repository at this point in the history
Document `pick_random` for empty arrays
  • Loading branch information
akien-mga committed Aug 21, 2023
2 parents 2c7cb4d + 30d4d1c commit 56dd0ed
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 56dd0ed

Please sign in to comment.