Need help understanding debug.info

In Roblox Studio I made a script which included getfenv. However, I saw that orange line under getfenv. When I hovered over the function, I read that it is deprecated and that I should use debug.info instead. So I looked up the debug library but it doesn’t explain the options argument for debug.info. Here is what I got when trying all options:

debug.info(2, x)

  • l - Line where 2nd stack led to this stack (number)
  • f - Function how 2nd stack led to this stack (function: 0x…)
  • a - Unknown (number, boolean)
  • s - Same as getfenv(s).script:GetFullName() (ServerScriptService.Script)
  • n - Unknown (nil)

I still don’t know what the a or n options do. Can somebody explain?

It says on the page you linked that a is the arity and whether the function is variadic, and n is the function name, which may be nil if the function is anonymous (which would be the case for the main chunk too I guess)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.