ZH-CN/getAccountSerial: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) (Created page with "__NOTOC__ {{Server function}} {{New items|3.0140|1.4| This function returns the last serial that logged onto the specified account. }} ==Syntax== <syntaxhighlight...") |
Qwe7769611 (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{Server function}} | {{Server function}} | ||
{{New items|3.0140|1.4| | {{New items|3.0140|1.4| | ||
此函数返回上次登录到指定账户[[account]]的序列[[serial]]。 | |||
}} | }} | ||
== | ==语法== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getAccountSerial ( account theAccount ) | string getAccountSerial ( account theAccount ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{ | {{OOP_ZH-CN||[[account]]:getSerial|serial|}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theAccount:''' | *'''theAccount:''' 要从中获取序列号的帐户 | ||
===Returns=== | ===Returns=== | ||
返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”. | |||
== | ==示例== | ||
此示例添加命令“getaccserial”,该命令在聊天框中输出给定帐户的序列号. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("getaccserial", | addCommandHandler("getaccserial", |
Revision as of 05:48, 4 February 2021
此函数返回上次登录到指定账户account的序列serial。
语法
string getAccountSerial ( account theAccount )
OOP 语法 什么是OOP?
- 方法: account:getSerial(...)
- 变量: .serial
Required Arguments
- theAccount: 要从中获取序列号的帐户
Returns
返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”.
示例
此示例添加命令“getaccserial”,该命令在聊天框中输出给定帐户的序列号.
addCommandHandler("getaccserial", function (player, cmd, accountName) if accountName then local account = getAccount(accountName) if (account) then outputChatBox("Serial: " .. getAccountSerial(account)) else outputChatBox("Account not found") end end end )
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