• Lua Entity:Fire for map logic relays issue.
    2 replies, posted
[B]Hi, made this system with atmos (In atmos init.lua). When I start the server I get this error (for all :Fire's)[/B] [CODE] [ERROR] addons/dnc/lua/atmos/init.lua:395: attempt to index field 'Lua_Night_Lights_Off' (a nil value) 1. func - addons/dnc/lua/atmos/init.lua:395 2. fn - addons/dnc/lua/atmos/init.lua:185 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:110 [/CODE] [CODE] -- Custom calls for our blackmesa map, vingard. local M = ents.FindByClass( "logic_relay" ) if ( self.m_Time >= TIME_DUSK_END ) then self.Lua_Night_Lights_On:Fire( "Lua_Night_Lights_On", "", 0) self.Lua_Night_SpotLights_On:Fire( "Lua_Night_SpotLights_On", "", 0) end if ( self.m_Time >= TIME_DAWN_START ) then self.Lua_Night_Spotlights_Off:Fire( "Lua_Night_SpotLights_Off", "", 0) self.Lua_Night_Lights_Off:Fire( "Lua_Night_Lights_Off", "", 0) end [/CODE] All help is appricated thanks.
[code]self.Lua_Night_Lights_On[/code] does not exist then. And what are you doing with [code]local M = ents.FindByClass( "logic_relay" )[/code] I don't see it used anywhere
[QUOTE=Z0mb1n3;50868952][code]self.Lua_Night_Lights_On[/code] does not exist then. And what are you doing with [code]local M = ents.FindByClass( "logic_relay" )[/code] I don't see it used anywhere[/QUOTE] Ah, that was me testing something out before. So, the Lua_Night_Lights_On must be the entity name for it to work? Thanks.
Sorry, you need to Log In to post a reply to this thread.