Announcement

Collapse
No announcement yet.

Error: Can't start an online game that hasn't been created

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error: Can't start an online game that hasn't been created

    Hi,

    I'm extending UDK classes and for now I just want to fire a dedicated server with steamworks disabled.

    This is what I have in my GameInfo class

    Code:
    class IGame extends UDKGame;
    
    
    /* StartMatch()
    Start the game - inform all actors that the match is starting, and spawn player pawns
    */
    function StartMatch()
    {
    	GotoState('MatchInProgress');
    
    	super.StartMatch();
    
    	`log("START MATCH");
    }
    
    
    auto state PendingMatch
    {
    	function BeginState(Name PreviousStateName)
    	{
    		bWaitingToStartMatch = true;
    	}
    
    	function bool MatchIsInProgress()
    	{
    		return false;
    	}
    
    Begin:
    	StartMatch();
    }
    
    
    state MatchInProgress
    {
    	function bool MatchIsInProgress()
    	{
    		return true;
    	}
    }
    
    /**
      * Allows overriding of which gameinfo class to use.
      * Called on the DefaultGameType from the ini, or the one specified on the command line (?game=xxx)
      */
    static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
    {
    	return Default.Class;
    }
    
    
    DefaultProperties
    {
    	PlayerControllerClass=class'IPlayerController'
    	HUDType=class'IGFxController'
    	DefaultPawnClass=class'IBasePawn'
    
    	bDelayedStart=false
    }
    And I get this error:
    Code:
    Init: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
    Init: Version: 7546
    Init: Epic Internal: 0
    Init: Compiled (32-bit): Nov 18 2010 15:25:51
    Init: Changelist: 703463
    Init: Command line: Server ?TimeLimit=20 -Log -NoRC -Windowed -Release -Platform=PC -ResX=640 -ResY=480 -nomoviestartup -ConsolePosX=0 -ConsolePosY=0 -OneThread
    
    Init: Base directory: C:\UDK\UDK-2010-11\Binaries\Win32\
    DevConfig: GConfig::LoadFile associated file:  ..\..\UDKGame\Config\UDKCompat.ini
    
    
    ...more stuff..
    
    [0003.05] Init: UEngine initialized
    [0003.08] Log: Steamworks is unavailable
    [0003.09] Log: LoadMap: DM-Deck?Name=Player?Team=255?TimeLimit=20
    [0003.15] DevMemory: Virtual  memory allocation size:  87.53 MByte (91779072 Bytes)
    [0003.82] Log: Game class is 'IGame'
    [0003.82] Init: WinSock: Socket queue 131072 / 131072
    [0003.84] Log: NetMode is now 1
    [0003.87] Log: Primary PhysX scene will be in software.
    [0003.87] Log: Creating Primary PhysX Scene.
    [0003.92] Log: Bringing World DM-Deck.TheWorld up for play (30) at 2010.12.08-17.27.03
    [0003.92] ScriptWarning: No game settings to register with the online service. Game won't be advertised
            IGame DM-Deck.TheWorld:PersistentLevel.IGame_0
            Function Engine.GameInfo:RegisterServer:01DC
    
    [0003.93] Log: Bringing up level for play took: 0.100594
    [0003.93] Log: ########### Finished loading level: 0.864023 seconds
    [0003.93] Init: Game engine initialized
    [0003.93] Log: Initializing Game Engine Completed
    [0003.97] Error: Can't start an online game that hasn't been created
    I found that the following line from GameInfo.uc is the one throws that error:
    Code:
    GameInterface.StartOnlineGame(PlayerReplicationInfoClass.default.SessionName);
    But I have no idea how to fix this

    #2
    That's exactly what you should expect to happen, because you're not using Steam.

    Comment


      #3
      I don't think that is correct, because if I change the game type to the DefaultServerGame=UTGame.UTDeathmatch and let the steamworks disabled, that error doesn't pop up. If I was indeed to be forced to use steamworks it should fire the same error, right?

      This is what I get with UTDeathmatch:
      Code:
      [0013.47] Init: UEngine initialized
      [0013.60] Log: Steamworks is unavailable
      [0013.60] Log: LoadMap: DM-Deck?Name=Player?Team=255?TimeLimit=20
      [0013.67] DevMemory: Virtual  memory allocation size:  87.53 MByte (91779072 Bytes)
      [0022.11] Log: Game class is 'UTDeathmatch'
      [0022.11] Init: WinSock: Socket queue 131072 / 131072
      [0022.13] Log: NetMode is now 1
      [0022.16] Log: Primary PhysX scene will be in software.
      [0022.16] Log: Creating Primary PhysX Scene.
      [0022.21] Log: Bringing World DM-Deck.TheWorld up for play (30) at 2010.12.12-17.03.20
      [0022.65] Log: Bringing up level for play took: 0.506254
      [0022.65] Log: ########### Finished loading level: 9.042909 seconds
      [0022.65] Init: Game engine initialized
      [0022.65] Log: Initializing Game Engine Completed
      So I assume this is because I'm doing something wrong when I'm launching the server with my IGame gametype. Anyone knows what I'm missing?

      Comment


        #4
        Well, ok, now it has a game that does have a GameSettings setup for it -- but it still can't advertise it, because Steamworks isn't available. The advertising happens via Steamworks.

        It's just a warning you can safely ignore if you're not trying to advertise via Steamworks..

        Comment


          #5
          I understand advertising happens via Steamworks, but I don't want to use steam, and I'm planning to do later my own "advertiser". Set a php/mysql server to register/list servers, etc... Don't believe it's that hard.

          So, just to be sure, your saying that this:
          Code:
          [0003.97] Error: Can't start an online game that hasn't been created
          is just a warning I can safely ignore?

          Either way I would like to have my IGame with those right GameSettings, so it wouldn't show that Error/warning. That error also shows up when the game ends, like "Can't end an online game bla bla".

          Comment


            #6
            well.. got it. I found this OnlineGameSettingsClass=class'UTGame.UTGameSetting sDM' in the UTDeathmatch class, and since you said it has the right GameSettings, I went to see if this is what you were talking about and copy-paste that line to my IGame, and it did it. I guess I'll have to do my own OnlineGameSettingsClass even if I don't want to publish the game right now.

            Many thanks btw ^^

            Comment


              #7
              The OnlineGameSettings is used specifically by the OnlineSubsystem, which is Steam. You're pretty much in the same boat specifying it, as you are not, either way the engine will act the same

              I would figure with integrated steam support, why would people write their own master system? It's why I never finished mine

              Comment

              Working...
              X