Sintaks
RakNet.is_enabled(): booleanAlias
raknet.is_enabledReturn
| Nama | Tipe | Deskripsi |
|---|---|---|
enabled | boolean | true when the RakNet API surface was registered for this session; false otherwise. |
Deskripsi
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.
Panggil tanpa parameter. Fungsi membaca context yang dibutuhkan dari status runtime saat ini.
Mengembalikan enabled (boolean). Gunakan tabel returns untuk memisahkan nilai sukses, hasil nil, dan error yang bisa dipulihkan.
Contoh
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)