Skip to Content
Lua Quick Start Guide
book

Lua Quick Start Guide

by Gabor Szauer
July 2018
Beginner
202 pages
5h 42m
English
Packt Publishing
Content preview from Lua Quick Start Guide

The debug.getinfo return value

No matter what the argument, the debug.getinfo function will return a table. This table will contain information about the function being inspected. When called with an integer, the return table will contain the following fields/variables:

  • source: Where the function is defined. This will contain the name of the file that a function is defined in.
  • short_src: A short textual version of the function, up to 60 characters.
  • linedefined: The first line of the source file where the function was defined.
  • lastlinedefined: The last line in the source file where the function was defined.
  • what: If the function is a "Lua" or a "C" function, the appropriate string will be returned.
  • name: Lua's best guess at the name of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Lua Programming

Beginning Lua Programming

Kurt Jung, Aaron Brown
Vim Masterclass

Vim Masterclass

Jason Cannon

Publisher Resources

ISBN: 9781789343229Supplemental Content