Difference between revisions of "FBInstant.context.isSizeBetween"
From GiderosMobile
Line 2: | Line 2: | ||
'''Available since:''' Gideros 2018.3<br/> | '''Available since:''' Gideros 2018.3<br/> | ||
=== Description === | === Description === | ||
− | <br /> | + | <translate><br /> |
This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive. If one of the bounds is null only the other bound will be checked against. It will always return the original result for the first call made in a context in a given game play session. Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.<br /> | This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive. If one of the bounds is null only the other bound will be checked against. It will always return the original result for the first call made in a context in a given game play session. Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.<br /> | ||
− | <br /> | + | <br /></translate> |
<source lang="lua"> | <source lang="lua"> | ||
(table) = FBInstant.context.isSizeBetween(minSize,maxSize) | (table) = FBInstant.context.isSizeBetween(minSize,maxSize) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''minSize''': (number) The minimum bound of the context size query. <br/> | + | '''minSize''': (number) <translate>The minimum bound of the context size query.</translate> <br/> |
− | '''maxSize''': (number) The maximum bound of the context size query. <br/> | + | '''maxSize''': (number) <translate>The maximum bound of the context size query.</translate> <br/> |
=== Return values === | === Return values === | ||
− | '''Returns''' (table) Table containing answers to the query.<br/> | + | '''Returns''' (table) <translate>Table containing answers to the query.</translate><br/> |
=== Examples === | === Examples === | ||
'''Example'''<br/> | '''Example'''<br/> | ||
− | <source lang="lua" | + | <source lang="lua"> |
result=FBInstant.context.isSizeBetween(3,5) | result=FBInstant.context.isSizeBetween(3,5) | ||
if result then | if result then |
Revision as of 13:38, 23 August 2018
Available since: Gideros 2018.3
Description
This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive. If one of the bounds is null only the other bound will be checked against. It will always return the original result for the first call made in a context in a given game play session. Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.
(table) = FBInstant.context.isSizeBetween(minSize,maxSize)
Parameters
minSize: (number) The minimum bound of the context size query.
maxSize: (number) The maximum bound of the context size query.
Return values
Returns (table) Table containing answers to the query.
Examples
Example
result=FBInstant.context.isSizeBetween(3,5)
if result then
print("Answer",result.answer)
print("MinSize",result.minSize)
print("MaxSize",result.maxSize)
<br/>