Reading a static array from a config file

  • 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.

JamesKilton

UA Coder
Oct 6, 2002
210
0
0
Everywhere and Nowhere
Visit site
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:

elmuerte

Master of Science
Jan 25, 2000
1,936
0
36
42
the Netherlands
elmuerte.com
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