SlashCo Wiki

Player:SecondaryItemFunctionOrElse

 any Player:SecondaryItemFunctionOrElse( string funcName, table fallback, any ... )

Description

Same as Player:SecondaryItemFunction, but returns the given fallback table's values (unpacked) if the callback doesn't return a truthy value.

Arguments

1string funcName

Name of the callback function to call.

2table fallback

Values to return (unpacked) if the callback doesn't return anything truthy.

3any ...

Additional arguments passed to the callback.

Returns

1any ...

The callback's return values, or the unpacked fallback table.