Greetings,
I've recently been working on a command where I need to print a table out silently. However after quite a bit of attempts I can't seem to get it to work (Perhaps fancyLog isn't capable of accepting a table with a value as a table as such?). I couldn't find any documention on the function and had to guess by looking at the code declared in log.lua. Which I admit, I probably did pretty bad at properly reading.
-- standard ulx command stuff
local tb = { }
for _ , v in pairs( player.GetHumans( ) ) do
table.insert ( tb , { ["Fruit"] = "Apple" , ["Amount"] = 0 } )
end
ulx.fancyLog(calling_ply, true ,"Fruits: #s[#i]", tb.Apple, tb.Amount )
--ending ulx command stuff
An output would look something like:
>Fruits: Apple[1], Banana[3], Corn[0]
And my lastest attempt with code similar to the example resulted in an error:
[ERROR] addons/ulx/lua/ulx/log.lua:440: attempt to call method 'gsub' (a nil value)
1. fancyLogAdmin - addons/ulx/lua/ulx/log.lua:440
2. fancyLog - addons/ulx/lua/ulx/log.lua:504
Any help would greatly be appreciated. Thanks for your time!