sumneko / w3x2lni

魔兽地图格式转换工具
GNU General Public License v3.0
115 stars 44 forks source link

lni conversion error #62

Closed dke-chan closed 4 years ago

dke-chan commented 4 years ago

Build: 62323dd9de8b357af12252ca14efc53fba51e220 Command: w2l.exe lni MapFile.w3x Error Returned and Stack Trace

Converting WTG file...
 78%[===============>----]
E:\Desktop\the-black-road-rpg\bin\w3x2lni\bin\w3x2lni-lua.exe: .\core\slk/backend_lml.lua:181: attempt to get length of a nil value (local 'buf')
        .\core\slk/backend_lml.lua:274: in method 'backend_lml'
        .\core\slk/backend.lua:99: in upvalue 'convert_wtg'
        .\core\slk/backend.lua:388: in method 'backend'
        .\backend\convert.lua:141: in function 'backend.convert'
        .\backend\init.lua:12: in main chunk
        [C]: in function 'require'
        E:\Desktop\the-black-road-rpg\bin\w3x2lni\script\main.lua:2: in main chunk
        [C]: in ?

Important: Not related to Warcraft III Patch 1.32 + JASSHelper

Description I tried running the quoted command on my map which produces the following error. I experimented with deleting triggers from the map until the quoted command worked.

I suspect that there might be a maximum line number with reading the wct and/or the wtg files? Someone who was more knowledgeable with lua suggested that wct.triggers[i] can generate a null entry as a result.

I might try to see whether I can echo the output of wct.triggers when I get the chance.

sumneko commented 4 years ago

Could please give me a demo map?

dke-chan commented 4 years ago

Here is a demo map which generates the error mentioned sumnekoTest.zip. All the triggers are disabled as I imported in the triggers from the map I help develop.

sumneko commented 4 years ago

It seems the format of the war3map.wct has been changed, I will try support it.

sumneko commented 4 years ago

It should be supported, please help me test it.

dke-chan commented 4 years ago

I'll try it out once I'm back from work!

dke-chan commented 4 years ago

Yes, it seems to be working as intended for both obj > lni and lni > obj! I'll let you know if my dev team run into any other unexpected behaviour.

dke-chan commented 4 years ago

Just updating that everything seems to be working fine. There is something else I want to address, but, it is an entirely different issue to this one. Feel free to close this issue :)