構文
RakNet.is_enabled(): booleanエイリアス
raknet.is_enabled戻り値
| 名前 | 型 | 説明 |
|---|---|---|
enabled | boolean | true when the RakNet API surface was registered for this session; false otherwise. |
説明
Boolean field on the RakNet table. It is true only when RakNet support is enabled for the current Real session. When it is false, the RakNet table is still present, but the send, hook, signal, priority, and reliability fields are not registered.
パラメータなしで呼び出します。関数は現在の runtime 状態から必要な context を読み取ります。
enabled (boolean) を返します。戻り値表を使って成功値、nil 結果、回復可能なエラーを分けて扱ってください。
例
Check whether the RakNet API surface is available before reading RakNet methods or enum tables.
if not RakNet.is_enabled then
warn("RakNet is disabled")
return
end
print(RakNet.is_enabled)