Vp data: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
Sleepy E (talk | contribs)
Basic layout
 
Sleepy E (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{sdk method page|data|Return a pointer to data attribute.
{{sdk method page|data|Return the value of a data attribute.
|paramex=attr, length
|paramex=attr, length
|parameters=
|parameters=
   {{sdk parameter row|vp_data_attribute_t |attr  |Attribute to return value of}}
   {{sdk parameter row|vp_data_attribute_t |attr  |Attribute to return value of (defined in VP.h)}}
   {{sdk parameter row|int*                |length |Returns length of the data}}
   {{sdk parameter row|int*                |length |Returns length of the data}}
|returns=
|returns=
  const char*
The value of the attribute.
|behavior=
|behavior=If the data attribute has not been set, then NULL will be returned and length is set to 0. If an invalid identifier is passed for <i>attr</i>, then NULL will be returned and length will <b>not</b> be set.
|caveats=If an invalid value is passed for attr, then a pointer to NULL will be returned (and length will not be returned).
|caveats=This returns a pointer to binary data. Not a null-terminated string.
|examples=
|examples=
|seealso=
|seealso=
* {{sdk method|data_get}}
* {{sdk method|data_set}}
* {{sdk method|data_set}}
}}
}}

Latest revision as of 22:12, 13 December 2016

Method call snippet vp_data(instance, attr, length);

Return the value of a data attribute.

Parameters

These are the parameters that this method requires:

Parameter Usage
VPInstance
instance
Pointer to the instance this method call is intended for
vp_data_attribute_t
attr
Attribute to return value of (defined in VP.h)
int*
length
Returns length of the data

Returns

The value of the attribute.

Behavior

If the data attribute has not been set, then NULL will be returned and length is set to 0. If an invalid identifier is passed for attr, then NULL will be returned and length will not be set.

Caveats

This returns a pointer to binary data. Not a null-terminated string.

Examples

This method has no usage examples; please add at least one to this page

See also