Syntax

Command Description Return Value
Return <value> Returns from CueScript function while returning a value to the caller. <value>

Abbreviation

RET

Description

The Return command stops execution of the current CueScript code block and returns the given value to the caller. This command is useful inside of functions written in CueScript.

Examples

Return 1
Stops executing this CueScript and returns the value 1 to the calling function.

If ('x' > 5) Then
     Return "A"
Else
     Return "B"
EndIf
If variable x is greater than 5 then the CueScript function will return the string A, otherwise it will return the string B.