Libraries imported?...

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Libraries imported?...

Post 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
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Libraries imported?...

Post 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.
Post Reply