User:Roy Curtis/sample/SDK method: Difference between revisions
Jump to navigation
Jump to search
Roy Curtis (talk | contribs) draft commit |
Roy Curtis (talk | contribs) mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{sdk method page|sdk_method|Makes the SDK do something either to the VP universe, world or local state. | {{sdk method page|sdk_method|Makes the SDK do something either to the VP universe, world or local state. | ||
| | |paramex=intValue, stringValue, floatValue | ||
|parameters= | |||
{{sdk parameter row|int |intValue |Integer value directly used by this method}} | |||
{{sdk parameter row|string|stringValue|String value directly used by this method}} | |||
{{sdk parameter row|float |floatValue |Float value directly used by this method}} | |||
|attributes= | |attributes= | ||
{{sdk attribute row|int |INT_VALUE |Used int value sent to server}} | {{sdk attribute row|set=|int |INT_VALUE |Used int value sent to server}} | ||
{{sdk attribute row|float |FLOAT_VALUE |Used float value sent to server}} | {{sdk attribute row|set=|float |FLOAT_VALUE |Used float value sent to server}} | ||
{{sdk attribute row|string|STRING_VALUE|Used string value sent to server}} | {{sdk attribute row|set=|string|STRING_VALUE|Used string value sent to server}} | ||
{{sdk attribute row|data |DATA_VALUE |Used data value sent to server}} | {{sdk attribute row|set=|data |DATA_VALUE |Used data value sent to server}} | ||
|returncodes= | |||
{{sdk return code row|failure|General failure}} | |||
|returnattributes= | |||
{{sdk attribute row|int |INT_RET_VALUE |Returned by successful method call}} | |||
{{sdk attribute row|float |FLOAT_RET_VALUE |Returned by successful method call}} | |||
{{sdk attribute row|string|STRING_RET_VALUE|Returned by successful method call}} | |||
|behavior= | |behavior= | ||
* This is the behavior of this SDK | * This is the behavior of this SDK method (e.g. when and why it should be used) | ||
|caveats= | |caveats= | ||
* This is a common pitfall, missing expected functionality or otherwise something to look out for when | * This is a common pitfall, missing expected functionality or otherwise something to look out for when calling this method | ||
|examples= | |examples= | ||
:''This is where a minimal example would go for using this | :''This is where a minimal example would go for using this method'' | ||
|seealso= | |seealso= | ||
* Related SDK | * Related SDK methods | ||
* Related SDK stuff | * Related SDK stuff | ||
|category= | |category= | ||
}} | }} |
Latest revision as of 16:28, 28 September 2013
Method call snippet
vp_sdk_method(instance, intValue, stringValue, floatValue);
Makes the SDK do something either to the VP universe, world or local state.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
int intValue |
Integer value directly used by this method |
string stringValue |
String value directly used by this method |
float floatValue |
Float value directly used by this method |
Used attributes
This method uses data set in these attributes when called:
Attribute | Usage | |
---|---|---|
VP_INT_VALUE | Used int value sent to server | |
VP_FLOAT_VALUE | Used float value sent to server | |
VP_STRING_VALUE | Used string value sent to server | |
VP_DATA_VALUE | Used data value sent to server |
Returns
This method returns a return code integer, which indicates whether the call was successful or errored for any reason:
Return code | Cause |
---|---|
VP_RC_SUCCESS |
Successful call (for methods that have a registered callback, it only means the request has been sent) |
VP_RC_FAILURE |
General failure |
The following attributes will be returned in VP_CALLBACK_SDK_METHOD
if the operation was successful:
Attribute | Usage | Also returned for |
---|---|---|
VP_INT_RET_VALUE | Returned by successful method call | |
VP_FLOAT_RET_VALUE | Returned by successful method call | |
VP_STRING_RET_VALUE | Returned by successful method call |
Behavior
- This is the behavior of this SDK method (e.g. when and why it should be used)
Caveats
- This is a common pitfall, missing expected functionality or otherwise something to look out for when calling this method
Examples
- This is where a minimal example would go for using this method
See also
- Related SDK methods
- Related SDK stuff