Skip to content

Commit 278401f

Browse files
committed
Update sh_base.lua
1 parent e253689 commit 278401f

File tree

1 file changed

+7
-6
lines changed
  • workshop/gamemodes/cinema_modded/gamemode/modules/theater/services

1 file changed

+7
-6
lines changed

workshop/gamemodes/cinema_modded/gamemode/modules/theater/services/sh_base.lua

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,18 @@ if CLIENT then
122122
print(("[%s - Debug]: %s"):format(serviceName, msg))
123123
end
124124

125-
if msg:StartWith("METADATA:") then
126-
local metadata = util.JSONToTable(string.sub(msg, 10))
125+
if msg:StartWith("ERROR:") then
126+
local errmsg = string.sub(msg, 7)
127127

128-
callback(metadata)
128+
callback({ err = errmsg })
129129
panel:Remove()
130+
return
130131
end
131132

132-
if msg:StartWith("ERROR:") then
133-
local errmsg = string.sub(msg, 7)
133+
if msg:StartWith("METADATA:") then
134+
local metadata = util.JSONToTable(string.sub(msg, 10))
134135

135-
callback({ err = errmsg })
136+
callback(metadata)
136137
panel:Remove()
137138
end
138139
end

0 commit comments

Comments
 (0)