Syntax
RakNet.is_enabled(): booleanAliase
raknet.is_enabledRückgaben
| Name | Typ | Beschreibung |
|---|---|---|
enabled | boolean | true when the RakNet API surface was registered for this session; false otherwise. |
Beschreibung
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.
Rufe es ohne Parameter auf. Die Funktion liest den nötigen Kontext aus dem aktuellen Runtime-Status.
Es gibt enabled (boolean) zurück. Nutze die Rückgabetabelle, um erfolgreiche Werte von nil-Ergebnissen und behandelbaren Fehlern zu trennen.
Beispiel
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)