A Lua Error when cloning car model and corresponding car trims

I recently tried to clone a car model and this error popped up:

Hopefully this helps to figure out what causes it.

Full error here

Exception: Lua Function Call: PollThreads PollThreads: scripts/shared/functional/COMMON/CCompany_Main.lua:831: attempt to index local ‘TrimInfo’ (a nil value)
Stack Traceback

===============

(1) metamethod C function ‘__index’
(2) Lua method ‘GetTrimCalculator’ at file ‘scripts/shared/functional/COMMON/CCompany_Main.lua:831’
Local variables:
self = table: 0x0289a41f3680 {Database:table: 0x0289a41f0140, Info:table: 0x0289a41f84c0, CarProjects:table: 0x0289a41f93c0 (more…)}
TrimUID = string: “C036339A4F618E93CAAF39AFCD35ACAA”
TrimCalc = nil
TrimInfo = nil
(*temporary) = number: 1.37918e-311
(*temporary) = table: 0x0289a41f0140 {UpdateTrimSlotTrim:table: 0x0289a4192240, InsertUpdateCarProjectRegionStmt:table: 0x0289a414b5c0 (more…)}
(*temporary) = string: “C036339A4F618E93CAAF39AFCD35ACAA”
(*temporary) = nil
(*temporary) = string: “SELECT * FROM Trims WHERE UID = “C036339A4F618E93CAAF39AFCD35ACAA”;”
(*temporary) = nil
(*temporary) = number: 1.37919e-311
(*temporary) = table: 0x0289a41fd400 {1:sqlite virtual machine (SELECT * FROM Trims WHERE UID = :TUID;)}
(*temporary) = table: 0x0289b1f31c80 {TUID:C036339A4F618E93CAAF39AFCD35ACAA}
(*temporary) = string: “attempt to index local ‘TrimInfo’ (a nil value)”
(3) Lua field ‘Callback’ at file ‘scripts/shared/functional/SANDBOX_DATA/CGame_Main.lua:265’
Local variables:
self = table: 0x0289a40185c0 {CarAI:table: 0x0289a40e32c0, JobSystem:table: 0x0289a4014580, Time:table: 0x028a3016c840 (more…)}
job = table: 0x0289b1305500 {IndexUID:C036339A4F618E93CAAF39AFCD35ACAA, TrimUID:C036339A4F618E93CAAF39AFCD35ACAA (more…)}
(4) Lua field ‘Poll’ at file ‘scripts/shared/functional/CWorker.lua:291’
Local variables:
jobs = table: 0x0289f1a5c810 {1:T
BP CallStack
Unable to display Script Callstack. Compile with DO_BLUEPRINT_GUARD=1

1 Like