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) commit |
||
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. | ||
|param={{sdk parameter|int|intValue}}, {{sdk parameter|string|stringValue}}, {{sdk parameter|float|floatValue | |param={{sdk parameter|int|intValue}}, {{sdk parameter|string|stringValue}}, {{sdk parameter|float|floatValue}} | ||
|paramex=intValue, stringValue, floatValue | |paramex=intValue, stringValue, floatValue | ||
|attributes= | |attributes= | ||
{{sdk attribute row|int |INT_VALUE |Used int value sent to server}} | {{sdk attribute row|int |INT_VALUE |Used int value sent to server}} | ||
Line 7: | Line 7: | ||
{{sdk attribute row|string|STRING_VALUE|Used string value sent to server}} | {{sdk attribute row|string|STRING_VALUE|Used string value sent to server}} | ||
{{sdk attribute row|data |DATA_VALUE |Used data value sent to server}} | {{sdk attribute row|data |DATA_VALUE |Used data value sent to server}} | ||
|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}} | |||
|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= | ||
}} | }} |
Revision as of 12:54, 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) |
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