DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.84k stars 462 forks source link

Attempted to index nil value when using ExportLegends Info #1581

Open FatBunny13 opened 4 years ago

FatBunny13 commented 4 years ago
[DFHack]# exportlegends info
    Exporting:  World map/gen info
    Exporting:  Legends xml
    Exporting:  Extra legends_plus xml
        historical figure 0/49555 (0%)
        historical figure 10000/49555 (20%)
        historical figure 20000/49555 (40%)
...Domains of Dwarf Fortress/hack/scripts/exportlegends.lua:316: attempt to index a nil value
stack traceback:
        ...Domains of Dwarf Fortress/hack/scripts/exportlegends.lua:316: in global 'export_more_legends_xml'
        ...Domains of Dwarf Fortress/hack/scripts/exportlegends.lua:982: in global 'export_legends_info'
        ...Domains of Dwarf Fortress/hack/scripts/exportlegends.lua:1035: in local 'script_code'
        ...ts\Ancient Domains of Dwarf Fortress\hack\lua\dfhack.lua:680: in function 'dfhack.run_script_with_env'
        (...tail calls...)

Is this a problem with my download? This didnt happen on my other machine (it was a different world so its possible the word is corrupted)

lethosor commented 4 years ago

I wouldn't be surprised if it's a bug in the script - it's a complicated script and there's a lot that can go wrong. Unfortunately, line 316 in 0.47.04-r1 is rather complicated and it's hard to tell which part is failing from the error message. Could you upload the world (to http://dffd.bay12games.com or some other site)? You are using DFHack 0.47.04-r1, right?

You could also try upgrading to the latest version of the script here (clicking "Raw" should give a downloadable version). I don't know for sure if that will help, but it's possible that we've fixed the issue already.