Difference between revisions of "Debug.setupvalue"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.
+
<translate>This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.</translate>
 
<source lang="lua">
 
<source lang="lua">
 
(string) = debug.setupvalue(func,up,value)
 
(string) = debug.setupvalue(func,up,value)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''func''': (function) function to set the upvalue for <br/>
+
'''func''': (function) <translate>function to set the upvalue for</translate> <br/>
'''up''': (number) index of the upvalue <br/>
+
'''up''': (number) <translate>index of the upvalue</translate> <br/>
'''value''': (varies) value to set as upvalue <br/>
+
'''value''': (varies) <translate>value to set as upvalue</translate> <br/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (string) name of the upvalue or nil<br/>
+
'''Returns''' (string) <translate>name of the upvalue or nil</translate><br/>

Revision as of 14:32, 23 August 2018

Available since: Gideros 2011.6

Description

This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.

(string) = debug.setupvalue(func,up,value)

Parameters

func: (function) function to set the upvalue for
up: (number) index of the upvalue
value: (varies) value to set as upvalue

Return values

Returns (string) name of the upvalue or nil