I need to call some code "all-time", so I maked next script:
__xr={}
__xr.service={}
__xr.service.main={}
...
function service_zone_init(e)
end
function service_zone_main(e)
Prompt("HELLO " .. #__xr.service.main)
--for i=1, #__xr.service.main do
--local func
--func = __xr.service.main[i]
--if func ~= nil then
-- func()
--end
--end
-- in older versions of FPSC:R scripts of far objects not called
-- so I moved trigger zone nearlier to player
--SetPosition(e, g_PlayerPosX, g_PlayerPosY, g_PlayerPosY)
end
Basically, I want to iterate __xr.service.main function array, but it's worked only once. So I commented it and add Prompt("HELLO " .. #__xr.service.main) to show it's size. But it's also worked only one time. What I'm doing wrong?