Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / log file - best way to do this?

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Sep 2010 18:04
Hi everyone!


What's the best way to make a log file for a game? open to write will not save the file to the hard disk until close file is used, so this makes it a little problematic... Do I have to open, read, delete, write, add the additional info to it and then close the file for every time I want to log something? Or is there a "edit file" option somewhere?

Thanks,

TheComet

=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 30th Sep 2010 18:08
IanM's Matrix1 plugin set has a much more advanced set of file writing commands, altho I've never used them personally.

Instead, I create a log array, and save that occassionally (such as end of game, or session) using the normal DBP file commands.

Hope that helps

Devonps
16
Years of Service
User Offline
Joined: 5th Nov 2009
Location: Nottingham
Posted: 30th Sep 2010 19:23 Edited at: 30th Sep 2010 19:24
I use IanM's Matrix1 plugin for this activity (and many more) and it really is as simple.

My current project is set up like this...

...and I write to the log file like this...


As you can see I prefer to output the logfile as HTML but you can just as easily choose plain text.

Hope this helps,

Steve.

Marriage is a circle of rings....
Engagement ring, Wedding ring, Suffering!
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Sep 2010 19:32
And yet again, the good old Matrix1 Utils save my day

Thanks a lot!

TheComet

Login to post a reply

Server time is: 2026-07-23 08:18:03
Your offset time is: 2026-07-23 08:18:03