Page 1 of 1

Libraries imported?...

Posted: Tue Jan 19, 2010 9:43 am
by ian_scho
I recall that I couldn't use a function from the one of the libraries (it was ages ago though - a quick way to insert and remove elements from a list?), can you confirm which libraries you make available for use in DSB.EXE?

Code: Select all

      lua_State *L = lua_open();   /* opens Lua */
      luaopen_base(L);             /* opens the basic library */
      luaopen_table(L);            /* opens the table library */
      luaopen_io(L);               /* opens the I/O library */
      luaopen_string(L);           /* opens the string lib. */
      luaopen_math(L);             /* opens the math lib. */
Table library for shorcuts working with arrays, etc.
The IO library could be useful for someone to create their own dungeon specific properties file.
The String library is useful for... Oh never mind.
I'm not asking you to add these, just to know which are available to us!
Thanks

Re: Libraries imported?...

Posted: Tue Jan 19, 2010 8:10 pm
by Sophia
Base, string, and math are loaded by DSB. I think not loading table was an oversight, and probably the one you needed, so DSB 0.38 will support table, too. Io isn't and never will be supported, mostly because using it would clash with DSB's own io stuff and just cause problems. If you want your own dungeon-specific properties, you can store all of that in dungeon.dsb using exported variables.