Telling client vs server code realms
π Luaβ’Updated 2 days agoβ’0 views
There are automatic global variables SERVER and CLIENT which are only true in their realm. Code inside 'if SERVER then ... end' runs only on the server, 'if CLIβ¦
In GLua, how do you know whether code runs on the client or the server?
There are automatic global variables SERVER and CLIENT which are only true in their realm. Code inside 'if SERVER then ... end' runs only on the server, 'if CLIENT then ... end' only on the client, and code outside such blocks runs on both - so a function can exist in both realms.