You did not initialize GuildBankLedger.LibHistoireListener as a table isn't it?
Lua Code:
function GuildBankLedger:Initialize()
self.LibHistoireListener = {}
...
end
That's why it says nil error on that line. You want to add [guilID] to the table GuildBankLedger.LibHistoireListener but it is not a table.
And next time please post the whole lua errors (instead of only saying there is a nil error) so we are able to easily see where the nil happens. It tells you in that messages if you read it correctly :-) It also shows you the contents of variables and tables in that error message if you expand it.
And if you use sirinsdiators browser plugin for LibDebugLogger it even generates you an even better overview here adirectly inside the browser at
www.esoui.com -> e.g. via the Greasemonkey or Tampermonkey browser plugins/addons.
https://www.esoui.com/forums/showthread.php?t=9113