1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Reading a static array from a config file

Discussion in 'Programming' started by JamesKilton, Oct 11, 2003.

  1. JamesKilton

    JamesKilton UA Coder

    Joined:
    Oct 6, 2002
    Messages:
    210
    Likes Received:
    0
    Ok, so I have an ini file, AnnihilationBuildMenus.ini where it lists the needed arrays.

    Then I have this:

    Code:
    class UaBuildable extends Pawn
         config(AnnihilationBuildMenus);
    {
    }
    
    class UaStructure extends UaBuildable
    {
         var config class<UaUnit> CanBuild[35]; 
    }
    
    class UaUnit extends UaBuildable
    {
         var config class<UaStructure> CanBuild[35]; 
    }
    
    Now, in my Interaction, I display the values of these arrays 7 elements at a time. My problem is that sometimes the first 8 or so values load correctly, sometimes only the first loads correctly, and whatever in-between. This will probably work fine if I changed to a dynamic array, but I might have to check these arrays between the server and client, so really want to stay with static. Has anyone come across this problem?

    Snippet from AnnihilationBuildMenus.ini:
    Code:
    [Annihilation.UaArmKBotLab]
    CanBuild[0]=class'Annihilation.UaArmConstructionKBot'
    CanBuild[1]=class'Annihilation.UaArmPeewee'
    //CanBuild[2]=class'Annihilation.UaArmRocko'
    //CanBuild[3]=class'Annihilation.UaArmHammer'
    CanBuild[4]=class'Annihilation.UaArmJethro'
    //CanBuild[5]=class'Annihilation.UaArmWarrior'
    //CanBuild[6]=class'Annihilation.UaArmFlea'
    
    UaArmKBotLab extends UaStructure

    I'm stumped.

    Note: I have logged the arrays themselves, and for the Arm KBot Lab above, the log shows that only CanBuild[0] was loaded, everything else is None.
     
    Last edited: Oct 11, 2003
  2. elmuerte

    elmuerte Master of Science

    Joined:
    Jan 25, 2000
    Messages:
    1,936
    Likes Received:
    0
    I think it's better to check the array via a replicated function and direct the array, since all entries have to be replicated and that's not very efficient.

    As for this problem, I have no idea
     

Share This Page