Residays Posted July 31, 2018 Share Posted July 31, 2018 As always I go with my bad knowledge on this so here goes: I put TheWorld:DoPeriodicTask(announcement_cooldown, DoFunction) (announcement_cooldown and DoFunction are irrelevant right now) but client_log.txt shows this: [00:00:46]: [string "../mods/periodic-announcer/modmain.lua"]:34: attempt to index global 'TheWorld' (a nil value) If I do GLOBAL.TheWorld it says the field value is nil instead so I'm lost, thanks in advance. Link to comment https://forums.kleientertainment.com/forums/topic/94177-how-do-i-do-a-server-doperiodictask/ Share on other sites More sharing options...
DarkXero Posted August 3, 2018 Share Posted August 3, 2018 On 7/31/2018 at 9:57 AM, Residays said: attempt to index global 'TheWorld' (a nil value) local function hello(inst) GLOBAL.print("hey") end AddPrefabPostInit("world", function(inst) if inst.ismastersim then inst:DoPeriodicTask(3, hello) end end) Link to comment https://forums.kleientertainment.com/forums/topic/94177-how-do-i-do-a-server-doperiodictask/#findComment-1071698 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now