Halls Hopper
Posts: 68
Joined: Friday, 3rd January 2014, 22:52
lua file io
Hi,
As my lua magic gets more complex, the need of some logging tool rises. I don't want to use crawl.mpr as it gets quite spammy, so my next option are files.
I tried to use lua's standard approach, but io is null:
Then I found a strange file.write method in crawl's sources, and it sounds like just what I need, but it requires a file handle as a parameter, and I don't really have that.
How can I append a string to a file in crawl's lua?
As my lua magic gets more complex, the need of some logging tool rises. I don't want to use crawl.mpr as it gets quite spammy, so my next option are files.
I tried to use lua's standard approach, but io is null:
Then I found a strange file.write method in crawl's sources, and it sounds like just what I need, but it requires a file handle as a parameter, and I don't really have that.
How can I append a string to a file in crawl's lua?
That's a silly name!