Announcement

Collapse
No announcement yet.

Gametype Network Problem - Replication Problem?

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

    Gametype Network Problem - Replication Problem?

    I have written a Menu extending from MidGamePanel.
    In
    Code:
    simulated function ShowPanel(bool bShow)
    there is
    Code:
    Core = ONSPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).GetCurrentNode();
    This results in (in UT2004.log)
    Code:
    Warning: UT2K4Tab_MenuTab Package.UT2K4Tab_MenuTab (Function MyPackage.UT2K4Tab_MenuTab.ShowPanel:01B7) Accessed None 'Core'
    Can't figure out why.

    #2
    because ONSPlayerReplicationInfo(PlayerOwner().PlayerRepli cationInfo).GetCurrentNode(); is apparently a NONE. You need to find out why (have you checked: playerowner() != none, PlayerOwner().PlayerReplicationInfo != none, ONSPlayerReplicationInfo(PlayerOwner().PlayerRepli cationInfo) != none?).

    Comment


      #3
      if you're reusing the ONS HUD and using a separate GameInfo class or subclassing Onslaught's gameinfo incorrectly, then the HUD code is going to complain. If you want the HUD/your gametype as an extension of Onslaught, then make sure you're overriding methods and calling super.

      But if you're creating a new gametype that doesn't rely on onslaught (likely?), then you're probably going to have to create your own HUD at some point that doesnt reference things ONS Hud expects.

      Comment


        #4
        The problem is that the code works fine offline put not on a dedicated server.
        But I figured out the the problem is not "Core = ...".
        Here is the complete code that makes problems of the function and the log result.

        simulated function ShowPanel(bool bShow)
        {
        local ONSPowerCore Core;
        local int i;

        Super.ShowPanel(bShow);

        if (playerowner() != none) log("playerowner() != none");
        if (PlayerOwner().PlayerReplicationInfo != none) log("PlayerOwner().PlayerReplicationInfo != none");
        if (ONSPlayerReplicationInfo(PlayerOwner().PlayerRepl icationInfo) != none) log("ONSPlayerReplicationInfo(PlayerOwner().Player ReplicationInfo) != none");
        Core = ONSPlayerReplicationInfo(PlayerOwner().PlayerRepli cationInfo).GetCurrentNode();
        log("core set");
        for (i = 0; i < Core.CloseActors.Length; i++)
        {
        log("iteration");
        }
        }

        ScriptLog: playerowner() != none
        ScriptLog: PlayerOwner().PlayerReplicationInfo != none
        ScriptLog: ONSPlayerReplicationInfo(PlayerOwner().PlayerRepli cationInfo) != none
        ScriptLog: core set
        Warning: UT2K4Tab_MenuTab Package.UT2K4Tab_MenuTab (Function MyPackage.UT2K4Tab_MenuTab.ShowPanel:0286) Accessed None 'Core'

        Comment


          #5
          it looks like the ONSPRI.getCurrentNode() is returning a null/None Core reference. "the method returns the powecore/node the player is currently standing on or in the node teleport trigger radius of, if that core/node is currently constructed for the same team as the player." Do you meet those requirements?


          Possible causes might be that the player and/or the player's team isn't associated with the node, that the base is initialized incorrectly(the wrong team), that the player isnt in range.

          Comment

          Working...
          X