Difference between revisions of "0AB2"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
: Returns from a [[SCM function|scm function]] | : Returns from a [[SCM function|scm function]] | ||
'''Syntax''' | '''Syntax''' | ||
− | : 0AB2: ret [''int''] ( [''any''] | + | : 0AB2: ret [''int''] ( [''any''] … ) |
'''Parameter''' | '''Parameter''' | ||
: [''int''] | : [''int''] |
Latest revision as of 20:51, 13 January 2019
For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05F6.
(with CLEO)
Description
- Returns from a scm function
Syntax
- 0AB2: ret [int] ( [any] … )
Parameter
- [int]
- Number of values to return
- [any]
- Returned values if there are ones (optional), up to 30
This opcode transfers the thread execution back to 0AB1 opcode and stores the returned values in its variables. Total number of returned values must be equal to the number of variables storing the result in 0AB1. If the 0AB2 opcode does not return any values, it must have a 0 as the only parameter, and proper 0AB1 that calls such a function should have no variables to store.
In this example 0AB2 returns only one value, which is the value of variable 0@, this value will be copied to the variable $result.
Keywords
CLEO, scm function, return, ret