28 Sep, 2007, Meryk wrote in the 1st comment:
Votes: 0
I was convinced to use Lua by playing a game that already had it installed, and was told that there was a FUSS with it already incorporated. I downloaded that source and unpacked it. When I tried to compile:

In file included from imc.c:59:
mud.h:39:19: error: lua.h: No such file or directory
mud.h:40:22: error: lualib.h: No such file or directory
mud.h:41:23: error: lauxlib.h: No such file or directory
mud.h:2339: error: ISO C++ forbids declaration of âlua_Stateâ with no type
mud.h:2339: error: expected â;â before â*â token
make[1]: *** [o/imc.o] Error 1


I went into the lua dir and ran startup, but beyond that…I'm not sure where to even begin. Had I taken the time to install Lua myself, I may have a bit of an idea on what to do, but I got lazy. Also, the 'C++ forbids…' line is scaring me. :sad:

Ideas?
28 Sep, 2007, Brinson wrote in the 2nd comment:
Votes: 0
I know little about lua and less about fuss.

Are the files not there or not being read?

Maybe its a distrubition/licensing thing and you neeed to download them from elsewhere…?

Sorry I can't be more help.
28 Sep, 2007, Tyche wrote in the 3rd comment:
Votes: 0
Meryk said:
Had I taken the time to install Lua myself…


Maybe you should.
28 Sep, 2007, Meryk wrote in the 4th comment:
Votes: 0
I honestly do not know. The person that told me about this version of FUSS having Lua already installed didn't elaborate. As far as I know, there is not a licensing problem. Again, not putting Lua in myself probably makes it more difficult to understand.

I may end up going back to the regular 1.8 of FUSS, and try to install Lua at a later date. *shrug*
28 Sep, 2007, Guest wrote in the 5th comment:
Votes: 0
That version of FUSS appears to have the needed library calls in place, but your system doesn't have the actual lua library on it. That's something you'll need to take up with the host.
28 Sep, 2007, David Haley wrote in the 6th comment:
Votes: 0
Yes, you need to install Lua separately. I'm assuming you're talking about Nick Gammon's version with FUSS installed, using one Lua state per character? If you are the system administrator, install Lua globally using your package manager (e.g. apt-get install liblua, or yum install liblua, or something like that… maybe liblua5.1), or you can download it from source at www.lua.org. The compilation/installation instructions are pretty clear in that package.

If you're not system administrator, you'll have a slightly trickier time, because you'll have to install the Lua files to your home directory somewhere and then edit the FUSS makefile to point to the right places.
28 Sep, 2007, Meryk wrote in the 7th comment:
Votes: 0
Thanks, DH. It was Gammon's. I already switched back to the original FUSS, but I'll definitely be installing Lua down the road.
29 Sep, 2007, Darva wrote in the 8th comment:
Votes: 0
I'm actually semi-working on a mud that uses lua as an initialization language for mobs, objs, rooms, and areas, as well as handling their events. In a lot of ways the language feels almost perfect for a mud, the only gotcha I've had so far is how SWIG (the wrapper utility) interacts with lua's garbage handler, and boy was that a hard bug to track down.
29 Sep, 2007, David Haley wrote in the 9th comment:
Votes: 0
Hey Darva, I'd love to hear more about what you're up to. Nick Gammon and I are extremely interested in using Lua for MUDs, and I'm always curious to hear what others are doing. We also feel that it's just about perfect for a MUD. :smile:
30 Sep, 2007, Omega wrote in the 10th comment:
Votes: 0
lua = fun, I use it for my mudprogs in Sandstorm, and in SoldierSide (my soon to be released mud) it is a large part of the muds backbone, fully developed commands in lua, and basicaly, anything else said developer would need.

case and point.. Recently I tried out writing a webserver in lua… And made the webserver run from out of the lua parser of my mud… Crazy times..

Lua = fun :)
30 Sep, 2007, Darva wrote in the 11th comment:
Votes: 0
Well, what I'm doing at this point is still pretty basic. For a base i'm using Socketmud, I've wrapped my mobs, objs, rooms, areas, and exits with swig so that i can pass them back and forth between lua. Though you have to make dang sure C keeps ownership of the pointers, heh. Mostly lua creates the structures, and fills them out, then hands them back to C for them to be added to the world, and presented to the players. Lua is also responsible for dealing with events that happen to things.

i'm using a slightly OO concept to organize everything except areas. When a scriptfile is loaded it creates a table for itself, each function the (For the sake of argument, i'll use mobs from here on in) mob has is added to the mFunc table, which is then added to mobilefuncs[area id] under the mobs id, so that C can find it and call it.

I'm not much further along than that though yet. ::laughs:: Everything loads, and mobiles can execute commands, but so far that's it. You can't even interact with things yet. Though i'm currently working on the code to remove them from existance. I'll tack the script for my only mob on at the end here i guess.

local areauid = 1
local mobuid = 1

local mFunc = {}
local dMob

mobiletable[areauid][mobuid] = mFunc


function mFunc:LoadMob(caller, arg)
dMob = world.D_MOBILE()
world.init_mobile(dMob, mobuid, areauid);
world.rename_mobile(dMob, "Seraph")
return dMob;
end

function mFunc:OnDeath(caller, arg)
world.interpret_mobile(dMob, "say You killed me " .. caller.name .. " you @$@#!")
end


Oh, also, i've made all the entries for mobiles unable to be edited directly from lua, to prevent builders from simply going me.level = LEVEL_ADMIN, and such, so all editing of mobiles is through C functions like world.rename_mobile, unfortunatly.
0.0/11