From 7eab44e536fc784f0d9f5e235ea081ba35b65325 Mon Sep 17 00:00:00 2001 From: Vurv <56230599+Vurv78@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:06:56 -0700 Subject: [PATCH] Fix incorrect argument passed to chip error (#2795) --- lua/entities/gmod_wire_expression2/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/init.lua b/lua/entities/gmod_wire_expression2/init.lua index b6532d303b..266aca895b 100644 --- a/lua/entities/gmod_wire_expression2/init.lua +++ b/lua/entities/gmod_wire_expression2/init.lua @@ -308,7 +308,8 @@ function ENT:CompileCode(buffer, files, filepath) end local status, directives, buffer = E2Lib.PreProcessor.Execute(buffer,nil,self) - if not status then self:Error(directives) return end + if not status then return self:Error(directives[1].message) end + self.buffer = buffer self.error = false @@ -328,15 +329,15 @@ function ENT:CompileCode(buffer, files, filepath) self.trigger = directives.trigger local status, tokens = E2Lib.Tokenizer.Execute(self.buffer) - if not status then self:Error(tokens) return end + if not status then self:Error(tokens[1].message) return end local status, tree, dvars = E2Lib.Parser.Execute(tokens) - if not status then self:Error(tree) return end + if not status then self:Error(tree.message) return end if not self:PrepareIncludes(files) then return end local status, script, inst = E2Lib.Compiler.Execute(tree, directives, dvars, self.includes) - if not status then self:Error(script) return end + if not status then self:Error(script.message) return end self.script = script self.registered_events = inst.registered_events