Closed Rakaneth closed 5 years ago
I fixed this in my local copy by updating line 2523 in libtcodpy.py:
def _pycall_parser_new_struct(struct, name):
return _parser_listener.end_struct(struct, _unpack_char_p(name))
I updated this to:
def _pycall_parser_new_struct(struct, name):
return _parser_listener.new_struct(struct, _unpack_char_p(name))
Sorry for that. The parser rarely gets used from Python. I'll deploy a fix today.
Indeed - like I said, I've got data files from a C++ version of the game and it's about as much effort writing the parsers as it is to convert the data files to something suitable in Python.
I'm using Python 3.7.2 and trying to use the file parser (I am porting from a C++ version of the same game and already have data files written in that format). I have defined my custom listener:
My data file looks like this:
The new_struct function is not getting called, though everything else is.