Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Support > Dedicated Server
FAQ Community Calendar

Dedicated Server Discuss technical issues related to hosting your own servers.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2012, 07:23 PM
LewisH LewisH is offline
Senior Member
 
Join Date: Mar 2012
Location: Earth
Posts: 215
Default Can't read server log while server is open

Hello, I've been trying to create a standalone windows application that reads the server logs, and forces all the players onto a specific team when a coop map is started (also resets when teams are balanced and prevents players from switching)

so far I've just been trying to find an efficient way to check for changes in the log file, then send the last line to a function.

Everything works fine when I edit the log file in notepad and save it, but the server launcher seems to always have to file open, and I can't read it using my application...

If I try to open the application when the server's already open, it gives me an error. If I open it before opening the server launcher, I see "{"port":-1,"time":0,"date":"2012 Jun 28 18:51:15:313 BST","type":"sessionStart"}", then it stops updating.

Does anyone know why this is happening, and how I can fix it? >.<

Last edited by LewisH; 12-08-2012 at 03:38 PM.
Reply With Quote
  #2  
Old 08-15-2012, 12:58 AM
rawr rawr is offline
Junior Member
 
Join Date: Oct 2009
Posts: 15
Default

You need to open the file with the dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE flags set.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

see the documentation of the darkBASIC manual if thats possible.
if not, you need to import the function from kernel32.dll and call it directly
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An open letter to BALL server admins... tgleaf General Altitude Discussion 106 07-25-2011 09:43 PM
How do i post a server message in my server without joining the server? Knight Dedicated Server 22 09-27-2010 11:02 PM
Altitude TL Open #1 (EU Server) Stormich General Altitude Discussion 16 09-18-2010 09:09 PM
Can't open Server Configurator Firestrike Tech Support 3 06-10-2010 02:58 AM
SERver launcher wont open lordhades Dedicated Server 1 10-29-2009 12:18 AM


All times are GMT. The time now is 06:00 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC