Page 1 of 1

Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 6:47 am
by kxd
Hello all.

I'm here representing my two developer friends who currently have their plate full with coding for the game we're developing.

At the moment, however, we're having a bit of an issue with the cross platform aspect of the engine between Windows and Mac OS X (Currently running Lion, not Mountain Lion)

I receive this message. . .

http://i18.photobucket.com/albums/b103/ ... cture2.png

When trying to open the love file given in this directory.

http://i18.photobucket.com/albums/b103/ ... cture3.png

Unfortunately, I am not a coder. However, I will be happy to relay any of your suggestions to my two friends. Again, they would be here themselves except they're hard at work, and since I'm pushing for the cross platform capability, I'm doing the research on my own to bring it to them with some helpful pointers from the community. Any help you'd be willing to offer would be greatly appreciated.

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 7:36 am
by Roland_Yonaba
Welcome,

From what I can see, the is an path error in your code.
As Lua says, LuaXML cannot be found inside "libs/LuaXml" folder. Hence the error.
Maybe because the file you're requiring is not actually there, maybe a typo error in the path (which is case sensitive, remember)...
Or...

My bet is, you're attempting to load a *.dll / *.so file. To have it working, these files might be placed near love's dll files (SDL.dll, OpenAL32.dll, DevIL.dll,...) and should be called the very simple way:

Code: Select all

require 'LuaXML_lib'
There's also *A LOT* of alternate solutions in plain lua.
Just take what fits your needs, put the lua library file inside "libs/LuaXml" folder, and call them via require.

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 10:51 am
by bartbes
I'd suggest against binaries, there is, however a binary loader in love, if you put your so/dll in the base save directory (the save dir without your game on it) it should load. That said, going pure-lua is usually better. (And no-xml is even better! :P)

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 2:16 pm
by ivan
bartbes wrote:(And no-xml is even better! :P)
What's wrong with XML? :) I store a lot of my game content in XML format - anything from Box2D geometry to the user settings. XML is especially useful for level file formats because it makes your game content independent of your code. It allows you to drastically change your code without having to update any of the levels/content. It's also makes it easier to debug because your game content can easily be dumped to a file in readable form.

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 4:10 pm
by Robin
Why use XML if you have Lua?

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 6:11 pm
by ivan
Roland_Yonaba wrote:From what I can see, the is an path error in your code.
Not necessarily. I think "require" looks for files within a list of predefined directories which might be different on different platforms.
Why use XML if you have Lua?
For loading level files? :)

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 6:13 pm
by Nixola
I think he means:

Code: Select all

local map = {}
map[1] = {x = whatever, y = whatever, other=whatever}
return map

Re: Mac OS X Missing LuaXML_lib

Posted: Sat Aug 18, 2012 6:14 pm
by Lafolie
Robin wrote:Why use XML if you have Lua?
So that maybe it can interface with other programs that use XML structures? That said, if you don't intend for this to happen, I see no reason to use XML, it just adds unnecessary substance to files. You can just make your own 'formats' buy using love.filesystem or if you're of the persuasion, Lua io.

Re: Mac OS X Missing LuaXML_lib

Posted: Sun Aug 19, 2012 2:13 am
by ejmr
The OP is one of my team-mates, which is why I was hoping his problem with LuaXml on OSX is fixable :)

But as for why we are using XML... For one, like Lafolle says, it makes it possible to interface with other programs that understand XML. For example, our level and enemy definitions are in XML and we can validate them against a DTD or schema to help find errors. Another reason to use XML in our situation is because not everyone on the team is a programmer, but does have experience with HTML, so explaining XML structure is easier than explaining Lua.