Closed adrz closed 5 years ago
Hi,
I was wondering if it would be possible to have a callback at each tick. I try the following snippet:
from demoparser.demofile import DemoFile def tickend(): print(d.current_tick) path_file = 'astralis-vs-mibr-m3-inferno.dem' with open(path_file, 'rb') as f: data = f.read() d.add_callback('tick_end', tickend) d.parse()
and of course i got the following error:
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) TypeError: tickend() takes 0 positional arguments but 1 was given Exception ignored in: 'demoparser.demofile.DemoFile.emit' TypeError: tickend() takes 0 positional arguments but 1 was given ---------------------------------------------------------------------------
Cheers,
def tickend(current_tick): print(current_tick)
Perfect, thank you!
Hi,
I was wondering if it would be possible to have a callback at each tick. I try the following snippet:
and of course i got the following error:
Cheers,