| Mirage Source http://web.miragesource.net/forums/ |
|
| Server Log not fully working.... http://web.miragesource.net/forums/viewtopic.php?f=201&t=2129 |
Page 1 of 1 |
| Author: | Tayuke [ Thu Jun 21, 2007 10:12 pm ] |
| Post subject: | Server Log not fully working.... |
It was before, logging all the chat and stuff that was done in game...but now, it only records the last line of chat, or whatevr, and thats it in the log's. the last thing done...what's going one? |
|
| Author: | Coke [ Fri Jun 22, 2007 10:37 am ] |
| Post subject: | Re: Server Log not fully working.... |
Mine just doesent bother working anymore full stop lol |
|
| Author: | Matt [ Fri Jun 22, 2007 11:28 am ] |
| Post subject: | Re: Server Log not fully working.... |
Look up how to write multiple lines of text to a text file. The log system is broken in MS, well, from what I could see. My logs don't work at all, like Fox's. I posted a tutorial in the bug fix section a long time ago, but it got lost like 3 forums ago. People don't seem to keep the important tuts. -_- |
|
| Author: | Robin [ Fri Jun 22, 2007 1:25 pm ] |
| Post subject: | Re: Server Log not fully working.... |
Mine works fine... what the hell have you done? xD |
|
| Author: | Matt [ Fri Jun 22, 2007 2:44 pm ] |
| Post subject: | Re: Server Log not fully working.... |
I use 303, it's never worked for me properly. |
|
| Author: | Robin [ Fri Jun 22, 2007 2:59 pm ] |
| Post subject: | Re: Server Log not fully working.... |
Oh. Well, I use 3.0.3 and it works fine... I'll just go check my code, to see if I did have a bug just fixed it (I started this source like two years ago >.<) |
|
| Author: | Rian [ Sat Jun 23, 2007 6:36 am ] |
| Post subject: | Re: Server Log not fully working.... |
I also use 3.0.3...And mine also works just fine. |
|
| Author: | James [ Fri Jun 29, 2007 6:31 pm ] |
| Post subject: | Re: Server Log not fully working.... |
I think I found the problem: Code: Sub AddLog(ByVal Text As String, ByVal FN As String) Dim FileName As String Dim f As Long If ServerLog = True Then FileName = App.Path & "\logs\" & FN If Not FileExist(FN) Then f = FreeFile Open FileName For Output As #f Close #f End If f = FreeFile Open FileName For Append As #f Print #f, Time & ": " & Text Close #f End If End Sub Notice the AddLog only checks to see if FN exists, not if it exists in the logs folder. SO, it sees that the log file is not in the main folder, so it re-creates it in the log folder BECAUSE it's using FileName which has defined logs. Simple change FileExist(FN) to FileExist("logs\" & FN) and it should work... |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|