36.1 Overview

LuaBase contains functions to deal with the Lua VM that is at the heart of Hollywood. You will have to use these functions when writing plugins that add new commands and constants to Hollywood's script language. These plugins need to have the HWPLUG_CAPS_LIBRARY capability flag set. See Library plugins for details.

Hollywood is based on Lua 5.0.2, although it isn't compatible with the Lua language. See Differences between Hollywood and Lua for details.

Most functions that are offered by LuaBase are identical to their Lua counterparts. These ones aren't documented here. Please consult the Lua 5.0.2 manual for information on these functions. The following documentation only covers the functions that behave differently than their Lua counterparts or are Hollywood-specific additions.

Please note that many Lua functions jump directly into Hollywood's error handler in case something goes wrong. For example, functions like luaL_checklstring(), luaL_checktable(), or luaL_checknumber() will never return control to you if something goes wrong. They will always jump into Hollywood's error handler directly using the longjmp() API. Thus, you need take some care when it comes to managing resources that have been allocated by your function because you often do not get the chance to free them if an error occurs because the Lua functions jump directly into Hollywood's error handler. You need to find another way of making sure that resources get freed in case of an error as well so that you don't leak any memory.

LuaBase is available since Hollywood 5.0.

Note that LuaBase is not available in Hollywood Designer.


Show TOC