Hi there,
I’ve just been trying to compile a custom game database using the tools in the libretro-db directory and haven’t been having much success. There isn’t a huge amount of documentation or forum posts about it I could find, so I’m just checking to see if I’m missing anything.
I have dat files that appear to be formatted in the correct way, but just to be certain it will work I’ve been testing on the dat files that come with the source.
If I use the dat_converter as mentioned in the readme with the command: ./dat_converter snes.rdb “Nintendo - Super Nintendo Entertainment System.dat”
I get the output: Parsing dat file ‘Nintendo - Super Nintendo Entertainment System.dat’… error running function `init’: dat_converter.lua:101: Nintendo - Super Nintendo Entertainment System.dat:2:2: fatal error: Expected ‘(’ found ‘name’
The file I’m using is straight from the source files, I haven’t made any modifications to it. The first couple of lines are: clrmamepro ( name “Nintendo - Super Nintendo Entertainment System” description “Nintendo - Super Nintendo Entertainment System” version 20150215-231121 comment “no-intro | www.no-intro.org” )
I wondered if it may be something to do with UNIX vs Windows EOL characters so I tried it both ways, but got the same result.
I tried messing around with the lua_converter.exe though I’m not entirely certain what it’s there for (converting custom database formats?), and I did get a database file with something in it when I used the dat_converter.lua lua file, but it was empty. Kind of a longshot.
Tried running the lua file on its own without the wrapper ./dat_converter.lua snes.rdb “Nintendo - Super Nintendo Entertainment System.dat”
And I admit I’m pretty unfamiliar with lua, so I got nothing.
./dat_converter.lua: line 1: local: can only be used in a function
./dat_converter.lua: line 2: local: can only be used in a function
./dat_converter.lua: line 4: syntax error near unexpected token (' ./dat_converter.lua: line 4:
local function dat_lexer(f, fname)’
Is there anything glaringly wrong I’m doing here? Thanks!