RakNet

RakNet.is_enabled

Boolean field on the RakNet table.

Cú pháp

RakNet.is_enabled(): boolean
Alias raknet.is_enabled

Giá trị trả về

TênKiểuMô tả
enabledbooleantrue when the RakNet API surface was registered for this session; false otherwise.

Mô tả

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.

Goi khong can parameter. Function doc context can thiet tu runtime state hien tai.

Tra ve enabled (boolean). Dung bang returns de tach gia tri thanh cong, ket qua nil va loi co the xu ly.

Ví dụ

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)