GetAllAccountData: Difference between revisions
Jump to navigation
Jump to search
m (Добавление языков) |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(One intermediate revision by one other user not shown) | |||
Line 31: | Line 31: | ||
addCommandHandler( "getall", printAllData ) -- add a command handler for command 'getall' | addCommandHandler( "getall", printAllData ) -- add a command handler for command 'getall' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
Line 40: | Line 37: | ||
[[en:getAllAccountData]] | [[en:getAllAccountData]] | ||
[[ru:getAllAccountData]] | [[ru:getAllAccountData]] | ||
[[zh-cn: | [[zh-cn:GetAllAccountData]] |
Latest revision as of 15:46, 7 November 2024
This function returns a table containing all the user data for the account provided
Syntax
table getAllAccountData ( account theAccount )
OOP Syntax Help! I don't understand this!
- Method: account:getAllData(...)
- Variable: .data
Required Arguments
- theAccount: The account you wish to retrieve all data from.
Returns
A table containing all the user data. This table might be empty.
Example
function printAllData ( thePlayer ) local playerAccount = getPlayerAccount( thePlayer ) -- get his account if ( playerAccount ) then -- if we got the account then local data = getAllAccountData( playerAccount ) -- get data count = 0 for _ in pairs(data) do count = count + 1 end -- get the count outputChatBox ( "table holds " .. count .. " entries" ) -- output number of rows if ( data ) then for k,v in pairs ( data ) do outputChatBox(k..": "..v) -- print the key and value of each entry of data end end end end addCommandHandler( "getall", printAllData ) -- add a command handler for command 'getall'
See Also
- addAccount
- copyAccountData
- getAccount
- getAccountData
- getAccountName
- getAccountPlayer
- getAccountSerial
- getAccounts
- getAccountsBySerial
- getAllAccountData
- getPlayerAccount
- isGuestAccount
- logIn
- logOut
- removeAccount
- setAccountData
- setAccountPassword
- getAccountByID
- getAccountID
- getAccountIP
- getAccountsByData
- getAccountsByIP
- setAccountName