VP_CALLBACK_LOGIN

From Virtual Paradise Wiki
Revision as of 21:17, 30 July 2018 by Sleepy E (talk | contribs) (Removed reason codes that aren't passed to callback)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Callback set and handler snippet

vp_callback_set(instance, VP_CALLBACK_LOGIN, callback_login);

void callback_login(VPInstance instance, int reason_code, int reference) { }

Sent to the client in response to vp_login()

Reason code

This callback is passed a return code integer, which indicates whether the request was successful (0) or errored for any of these reasons:

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_STRING_TOO_LONG If any of the given string parameters exceed 255 bytes in length (when using UTF-8 encoded characters they can each be multiple bytes long)
VP_RC_INVALID_LOGIN The login credentials are incorrect

Return attributes

Attribute Usage
VP_MY_USER_ID User id of account used to log in

Behavior

There is no special behavior for this callback

Examples

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