Vp login: Difference between revisions
Jump to navigation
Jump to search
Roy Curtis (talk | contribs) m added RC |
Roy Curtis (talk | contribs) m clarification |
||
Line 8: | Line 8: | ||
{{sdk return code row|NOT_INITIALIZED|SDK not initialized with {{sdk method|init}} yet}} | {{sdk return code row|NOT_INITIALIZED|SDK not initialized with {{sdk method|init}} yet}} | ||
{{sdk return code row|INVALID_LOGIN |The login credentials are incorrect}} | {{sdk return code row|INVALID_LOGIN |The login credentials are incorrect}} | ||
{{sdk return code row|STRING_TOO_LONG|If any of the given parameters exceed 255 characters in length}} | {{sdk return code row|STRING_TOO_LONG|If any of the given string parameters exceed 255 characters in length}} | ||
|behavior= | |behavior= | ||
* When successfully logged in, bots will have square brackets around their name. For example, providing "Samantha" as the {{code|botname}} parameter will identify the bot as "[Samantha]". | * When successfully logged in, bots will have square brackets around their name. For example, providing "Samantha" as the {{code|botname}} parameter will identify the bot as "[Samantha]". |
Revision as of 15:23, 30 September 2013
Method call snippet
vp_login(instance, username, password, botname);
Logs in a bot to the universe server, using the credentials of an existing account.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
string username |
Username of the account to log into |
string password |
Password of the account to log into |
string botname |
Desired name for the bot to use |
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_NOT_INITIALIZED |
SDK not initialized with vp_init() yet
|
VP_RC_INVALID_LOGIN |
The login credentials are incorrect |
VP_RC_STRING_TOO_LONG |
If any of the given string parameters exceed 255 characters in length |
Behavior
- When successfully logged in, bots will have square brackets around their name. For example, providing "Samantha" as the
botname
parameter will identify the bot as "[Samantha]". - The user ID of the account used to log in will be exposed to other bots
Caveats
To log out from a universe, vp_destroy()
must be called which will also disconnect the bot from the universe.
Examples
- This method has no usage examples; please add at least one to this page
See also
vp_destroy()
vp_enter()