Issue Summary:
Since patch 1.6 CommandWindow.print(...)
tries to concatenate passed parameters without converting them to string first and without appending '\n'
at the end which results in:
- Ugly formatting (No line breaks)
- Crashes (if one of the parameters is neither
string
nornumber
)
Steps to Reproduce:
CommandWindow.print("My", "message", false)
Results in:
> <<Crash>>Access violation (0xc0000005) in build 8462f992ef28
> accessing address 0000000000000000 from 00007FF67792B67F <</Crash>>
Expected behavior:
> My message false
(Formatting just like in regular print
function.)
From within the Lua level can be fixed with an ugly hack:
local console_message = {...}
for i, element in ipairs(console_message) do
console_message[i] = tostring(element)
end
table.insert(console_message, '\n')
CommandWindow.print(table.concat(console_message, " "))