diff --git a/lua/entities/gmod_wire_expression2/base/compiler.lua b/lua/entities/gmod_wire_expression2/base/compiler.lua index 8b4c8f9afa..8f7a5fa83a 100644 --- a/lua/entities/gmod_wire_expression2/base/compiler.lua +++ b/lua/entities/gmod_wire_expression2/base/compiler.lua @@ -679,7 +679,7 @@ local CompileVisitors = { end end - if self.strict and not self.scope:IsGlobalScope() then + if self.strict and not (self.scope:IsGlobalScope() or (self.include and self.scope:Depth() == 1)) then self:Warning("Functions should be in the top scope, nesting them does nothing", trace) end