copyAccountData
Client-side
Server-side
Shared
This function copies all of the data from one account to another.
OOP Syntax Help! I don't understand this!
- Method: account:copyDataTo(...)
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
- bool: result
Returns a true if the accounts were valid, false otherwise.
Code Examples
server
This example copies the account data from the 'guest' to a registered account when they login.
function copyDataOnLogin ( previousAccount, currentAccount ) copyAccountData ( currentAccount, previousAccount )endaddEventHandler ( "onPlayerLogin", getRootElement(), copyDataOnLogin )
See Also
Account Functions
- addAccount
- copyAccountData
- getAccountByID
- getAccount
- getAccountData
- getAccountID
- getAccountIP
- getAccountName
- getAccountPlayer
- getAccountSerial
- getAccountType
- getAccounts
- getAccountsByData
- getAccountsByIP
- getAccountsBySerial
- getAllAccountData
- getPlayerAccount
- isGuestAccount
- logIn
- removeAccount
- logOut
- setAccountData
- setAccountName
- setAccountPassword
- setAccountSerial