Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/CpUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ function CpUtil.getName(object)
if object == CpUtil then
return 'ERROR, calling CpUtil.getName with : !'
end
if type(object) ~= 'table' then
printCallstack()
return 'ERROR, calling CpUtil.getName with a non-table: ' .. tostring(object)
end
local helperName = '-'
if object == object.rootVehicle then
helperName = object.id
Expand Down
4 changes: 2 additions & 2 deletions scripts/specializations/CpVehicleSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ end
function CpVehicleSettings:setPipeOffset()
local childVehiclesWithPipe, found = AIUtil.getAllChildVehiclesWithSpecialization(self, Pipe)
if #childVehiclesWithPipe > 1 then
CpUtil.infoVehicle(CpDebug.DBG_IMPLEMENTS, self, "More than one pipe found, using the first one")
CpUtil.infoVehicle(self, "More than one pipe found, using the first one")
for _, vehicleWithPipe in ipairs(childVehiclesWithPipe) do
CpUtil.infoVehicle(CpDebug.DBG_IMPLEMENTS, self, "\t vehicle with pipe: %s", CpUtil.getName(vehicleWithPipe))
CpUtil.infoVehicle(self, "\t vehicle with pipe: %s", CpUtil.getName(vehicleWithPipe))
end
end
if self.isServer and childVehiclesWithPipe[1] ~= nil then
Expand Down
Loading