AR/copyAccountData: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} This function copies all of the data from one account to another. ==Syntax== <syntaxhighlight lang="lua"> bool copyAccountData ( account theAccount, account fro...") |
(No difference)
|
Revision as of 04:46, 25 August 2012
This function copies all of the data from one account to another.
Syntax
bool copyAccountData ( account theAccount, account fromAccount )
Required Arguments
- theAccount: The account you wish to copy the data to.
- fromAccount: The account you wish to copy the data from.
Returns
Returns a true if the accounts were valid, false otherwise.
Example
This example copies the account data from the 'guest' to a registered account when they login
function copyDataOnLogin ( previousAccount, currentAccount, autoLogin) copyAccountData ( currentAccount, previousAccount ) end addEventHandler ( "onPlayerLogin", getRootElement(), copyDataOnLogin )