API:Dumping Warhammer LUA Tables
From TheWarWiki
WAR API Help
Open the Debug Window using /debug or WindowSetShowing("DebugWindow", true) and turn Logs On.
Now you can dump tables.
/script DUMP_TABLE(table)
Print a debug message:
/script d(luavariable)
e.g:
/script d("Hello i am a debug Message")
Alternative method
If you just want to see what kinds of methods/members an object or table has, and don't care about the values (just the structure), you can use the following function to recursively dump the structural tree to the chat window (where you can then get it out of the chat.log for reading outside of the client):
First, use the following command to create the dumper function:
/script dumpstuff = function(thing, prefix) if not prefix then prefix = "" end for k,v in pairs(thing) do EA_ChatWindow.Print(towstring(prefix..k.." ["..type(v).."]")) if type(v)=="table" then dumpstuff(v, " "..prefix) end end end
Then, simply use the following to dump whatever you want:
/script dumpstuff(TABLE_NAME_HERE)
