Lua C API tutorial: using the stack and working with tables

preview_player
Показать описание
This tutorial covers the most fundamental functions of Lua's C API. This will be useful to anyone:
* writing a Lua module that needs to run C code,
* embedding Lua as a scripting language, or
* creating a framework or game engine using Lua.

I don't specifically talk about C++ or Objective-C, but Lua's C API is compatible with those languages as well.

This video also uses an educational module called apidemo. If you have luarocks, you can install this module by running:

sudo luarocks install apidemo

This module is open source; here is the repo for it:

Рекомендации по теме
Комментарии
Автор

Just wanted to say thanks for putting this out there! :D

Rennan
Автор

Very good video on Lua and C. Hope you would create videos on the items you listed in the first minutes soon!!

isaacyuen
Автор

Great! Finally I could understand Lua Stack on C. Thanks!

MuriloFernandoFloriani
Автор

Thank you! Finally LuaC Api explained in a simple way!

rscutub
Автор

This is truly excellent, thanks a lot!

lydericlandry
Автор

Don't know if you still answer questions on this video since its 3 years old, but I have one nonetheless. At 35 minutes into the video you did a lua=tointeger(L, 2) and got back a 12 from the stack. Does a tointeger not change the value on stack the same as a push? Because right after you did an optnumber and it still returned the value 12.3 even tho you can converted to string and then converted to the number 12? I was just expecting the stack to now contain 12 in the 2 position of the stack and instead it still returned 12.3. Can you enlighten me as to what happened there?

allornonebaby
Автор

Hi Taylor, I love you videos. I wanted to know how I can setup Lua and C++ development environment to be able to use embed lua APIs in my C++ code. Which video have covered this? Thank you in advance

dochoex
Автор

Aw hell yeah, what's your Vim colour scheme? Is it premade or did you write it yourself?

needlessoptions
Автор

Who else is watching this because they want to script exploits for roblox?

morphings
welcome to shbcf.ru