Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > CoD Multiplayer

CoD Multiplayer Everything about multiplayer in IL-2 CoD

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2011, 11:15 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Alright, one more try.

Code:
     if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
     {
         if (Time.tickCounter() % 9000 == 0)
         {
             int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
             if(GamePlay.gpPlayer().Length > 0)
             {
                     GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, totalAircraft.ToString(), null);
              }
              if(GamePlay.gpRemotePlayers().Length > 0)
              {
                     GamePlay.gpLogServer(GamePlay.gpRemotePlayers(), totalAircraft.ToString(), null);
               }
         }
     }
If you're not using a dedicated server, you can get in an aircraft on the server and this should work.

Code:
     if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
     {
         if (Time.tickCounter() % 9000 == 0)
         {
             int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
             if(GamePlay.gpPlayer() != null)
             {
                     GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, totalAircraft.ToString(), null);
              }
         }
     }
Reply With Quote
  #2  
Old 05-27-2011, 11:57 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

For testing i am running a dedi server and joining it with a client from the same PC. I got error messages before joining the server.

It would be nice to have it working on a dedi server. Will try the latest version later. Thank you for your input.
Reply With Quote
  #3  
Old 05-27-2011, 12:02 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by Ataros View Post
For testing i am running a dedi server and joining it with a client from the same PC. I got error messages before joining the server.

It would be nice to have it working on a dedi server. Will try the latest version later. Thank you for your input.
I'm sorry it's not working right. The server log methods are a little confusing to me. Tomorrow, I'll see if I can find a better solution.
Reply With Quote
  #4  
Old 05-27-2011, 12:04 PM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Your efforts are appreciated...as for me, I haven't a bloody clue! Im just muddling along trying to get a mission to work!

Thanks
Reply With Quote
  #5  
Old 05-27-2011, 06:07 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Now it is better.
It says
"maddox.game.Player" does not contain definition for "Length"

Code:
[20:55:59]	=================================================
[20:55:59]	System.Exception: c:\Users\Andy\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\BoF1\BoF_1_main1_7.cs(105,37): error CS1061: "maddox.game.Player" не содержит определение для "Length". Не удалось найти метод  расширения "Length", принимающий первый аргумент типа "maddox.game.Player"  (пропущено использование директивы или ссылка на сборку?)
[20:55:59]	
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.DNrbvsoLYTD(String , Boolean , Boolean )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.3Iw2CLCaNTnBeBq9j1Yy(Object , Boolean , Boolean )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.XBibvrRFwOK(String )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.b2WbvifgeN1(String , Int32 )
[20:55:59]	=================================================
[20:55:59]	
[20:55:59]	=================================================
[20:55:59]	System.Exception: c:\Users\Andy\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\BoF1\BoF_1_main1_7.cs(105,37): error CS1061: "maddox.game.Player" не содержит определение для "Length". Не удалось найти метод  расширения "Length", принимающий первый аргумент типа "maddox.game.Player"  (пропущено использование директивы или ссылка на сборку?)
[20:55:59]	
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.b2WbvifgeN1(String , Int32 )
[20:55:59]	   в PvIUEjqHoL1yDhuyUY9.KErMihqBkLOM7gFVKGE.1sOBZ4gmJ3(MTsEYPOQbCed3fk571y )
[20:55:59]	=================================================
Reply With Quote
  #6  
Old 05-28-2011, 02:08 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Alright, I finally have a solution. This won't send a message to the server, but it will appear in the server logs as something like "server to [username]: ". It will appear every five minutes for everybody connected to the server. You can decrease the time interval by changing 9000 to a lower number.

As a reminder, this code goes in the OnTickGame() method and both sides have to have at least one aircraft. I hope this helps.

Code:
        if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
        {
            if (Time.tickCounter() % 9000 == 0)
            {
                int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
                if (GamePlay.gpRemotePlayers().Length > 0)
                {
                    GamePlay.gpLogServerBegin(GamePlay.gpRemotePlayers(), totalAircraft.ToString());
                    GamePlay.gpLogServerEnd();
                }
            }
        }

Last edited by TheEnlightenedFlorist; 05-29-2011 at 03:05 AM.
Reply With Quote
  #7  
Old 05-28-2011, 02:23 AM
Thee_oddball Thee_oddball is offline
Approved Member
 
Join Date: Mar 2011
Posts: 812
Default

Quote:
Originally Posted by Ataros View Post
Now it is better.
It says
"maddox.game.Player" does not contain definition for "Length"

Code:
[20:55:59]	=================================================
[20:55:59]	System.Exception: c:\Users\Andy\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\BoF1\BoF_1_main1_7.cs(105,37): error CS1061: "maddox.game.Player" не содержит определение для "Length". Не удалось найти метод  расширения "Length", принимающий первый аргумент типа "maddox.game.Player"  (пропущено использование директивы или ссылка на сборку?)
[20:55:59]	
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.DNrbvsoLYTD(String , Boolean , Boolean )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.3Iw2CLCaNTnBeBq9j1Yy(Object , Boolean , Boolean )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.XBibvrRFwOK(String )
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.b2WbvifgeN1(String , Int32 )
[20:55:59]	=================================================
[20:55:59]	
[20:55:59]	=================================================
[20:55:59]	System.Exception: c:\Users\Andy\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\BoF1\BoF_1_main1_7.cs(105,37): error CS1061: "maddox.game.Player" не содержит определение для "Length". Не удалось найти метод  расширения "Length", принимающий первый аргумент типа "maddox.game.Player"  (пропущено использование директивы или ссылка на сборку?)
[20:55:59]	
[20:55:59]	   в W95BpjQhQGdapXjq6AD.Y79VY6QHpIXBu63gDbj.b2WbvifgeN1(String , Int32 )
[20:55:59]	   в PvIUEjqHoL1yDhuyUY9.KErMihqBkLOM7gFVKGE.1sOBZ4gmJ3(MTsEYPOQbCed3fk571y )
[20:55:59]	=================================================
Error CS1061
This error occurs when you try to call a method or access a class member that does not exist.
__________________
Gigabyte Z68
Intel 2500K (@4.3 ghz)212 CM Cooler
8GB Ram
EVGA 660SC (super clocked) 2GB Vram
CORSAIR CMPSU-750TX 750W
64 GB SSD SATA II HD
WIN7 UL 64BIT
Reply With Quote
  #8  
Old 05-28-2011, 02:24 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by Thee_oddball View Post
Error CS1061
This error occurs when you try to call a method or access a class member that does not exist.
Yeah, that was my bad. I was trying to write code without an IDE.

My latest snippet of code should work though.
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


All times are GMT. The time now is 08:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.