Skip to content

Commit 59ff75b

Browse files
Fix: CreateObject parser when not Variable = CreateObject(...)
1 parent ebe1df6 commit 59ff75b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

[samp]/sampobj/scripts/texturestudio_parser.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,14 @@ function getTextureStudioMap(filename)
132132
end
133133
end
134134
if isCreateObject(line) then
135-
local b = split(line,"=")
136-
local model,x,y,z,rx,ry,rz,dist = parseCreateObject(b[2])
135+
local objdetails = ""
136+
if string.find(line, "=") then -- has variable = createObject
137+
objdetails = split(line,"=")
138+
objdetails = objdetails[2] or ""
139+
else
140+
objdetails = line
141+
end
142+
local model,x,y,z,rx,ry,rz,dist = parseCreateObject(objdetails)
137143
if model then
138144
table.insert(result, {
139145
f = "object",

0 commit comments

Comments
 (0)