asamy / forgottenmapeditor

Map editor written in lua for Open Tibia. Written with OtClient's framework.
Other
46 stars 20 forks source link

Error on save houses and spawns #25

Closed comedinha closed 11 years ago

comedinha commented 11 years ago

In save houses (button save enabled) get this error:

ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save houses XML /data/materials/Map-house.xml: 
stack traceback:
    [C]: ?
    [C]: in function 'save'
    /mapeditor_filebrowser/filebrowser.lua:95: in function 'saveMap'
    ...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>

In save spawns (button save enabled) get this error:

ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save spawns XML /data/materials/Map-spawn.xml: 
stack traceback:
    [C]: ?
    [C]: in function 'saveSpawns'
    /mapeditor_filebrowser/filebrowser.lua:96: in function 'saveMap'
    ...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>

On create a new map no get errors...

asamy commented 11 years ago

OTClient's upstream commit https://github.com/edubart/otclient/commit/092209c0bb0e7083d389b4fe991ed5e4ca475e1e should fix this. Can you try?

comedinha commented 11 years ago

Ok, w8 i go to home

comedinha commented 11 years ago

Fixed with a old maps, with new maps give the error:

ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save houses XML /New-houses.xml: 
stack traceback:
    [C]: ?
    [C]: in function 'save'
    /mapeditor_filebrowser/filebrowser.lua:89: in function 'saveMap'
    ...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>

Need function to check a new and old map?

asamy commented 11 years ago

That's odd, I'll see what I can do to fix this. And nah, it's not about a check. Can you try to save spawns? see if you get the same error.

comedinha commented 11 years ago

Get same error...

ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save spawns XML /New-spawns.xml: 
stack traceback:
    [C]: ?
    [C]: in function 'saveSpawns'
    /mapeditor_filebrowser/filebrowser.lua:90: in function 'saveMap'
    ...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>

Need add a return to continue, get error in the house and stop the save... In load xml have same error...

//Moved to this report :O

asamy commented 11 years ago

Try with latest commit, please.

asamy commented 11 years ago

If you could debug the save path in spawns then save spawns (with new maps) and give me the output would be nice:

g_logger.debug(stdext::format("Saving to: %s", g_resources.getRealPath(fileName)));

Thanks!

comedinha commented 11 years ago

Hello, i am back with a new computer ._

error:

ERROR: Failed to save 'newmap-2013-10-02-16-13-21-houses.xml': failed to save houses XML /newmap-2013-10-02-16-13-21-houses.xml: 
ERROR: Failed to save 'newmap-2013-10-02-16-13-21-spawns.xml': failed to save spawns XML /newmap-2013-10-02-16-13-21-spawns.xml: 
comedinha commented 11 years ago

and in old maps:

ERROR: Failed to save '/materials/1010/Map-houses.xml': failed to save houses XML //materials/1010/Map-houses.xml: 
ERROR: Failed to save '/materials/1010/Map-spawns.xml': failed to save spawns XML //materials/1010/Map-spawns.xml: