This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
cmdpwnd's profile picture

show loaded apis

Started by cmdpwnd, 04 January 2016 - 03:11 AM
cmdpwnd #1
Posted 04 January 2016 - 04:11 AM
how to get a list of loaded apis?
Lyqyd #2
Posted 04 January 2016 - 04:51 AM
Iterate _G looking for string keys with table values.
Lupus590 #3
Posted 04 January 2016 - 01:43 PM
Code which does what Lyqyd said to do, in a spoiler in case you wanted to do it yourself

print("Listing possible APIs which are loaded on this computer:")
for k, v in pairs(_G) do
  if type(v) = "table" then
	textutils.pagedPrint(tostring(k))
  end
end
Edited on 04 January 2016 - 12:44 PM
InDieTasten #4
Posted 04 January 2016 - 05:34 PM
+1 for unnecessary spoiler