UE2 - UT2kX String Arrays - Using Config Arrays in For Loops

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

Phoenix_Wing

Official Kantham Stalker
Mar 28, 2008
386
0
0
California
Hello again,

This is really annoying me right now. I have no idea why but I can't seem to use a config string array in a for loop.

I can access them just fine via a log before and after the for loop, but cannot log anything inside it.

Here is my code:

Code:
function Timer()
{
	local int i;
	local array<string> parts;
	log("Timer Called with Birthdays" @PlayerBirthdays[0]@PlayerBirthdays[1]);

        for (i = 0; i > PlayerBirthdays.Length; i++)
	{
		Split(PlayerBirthdays[i], ",", parts);
		if (parts.Length > 0)
	        {
			if (int(parts[1]) == Level.Month)
			{
				if (int(parts[2]) == Level.Day)
				{
                                       Check(parts[0]); //This is not a return function. This is passing the player name in the config file
			        }   
		       }
                }
		log("The Parts Are"@parts[0]@ parts[1]@ parts[2]); [b][color=red]This is never called.[/color][/b]
        }
	log("Ended Timer Logic");
}

The Ended log and Beginning log write just fine, however the For Log does not.

What I am trying to do is a Birthday mod similar to Clan Manager. You put in the config file the name of a player, Month they were born, and Day they were born. My code then checks each second if the player has joined and its their birthday with the LevelInfo Day and Month values.

I am doing this via a mutator class if it helps.

Anybody have any experience with this?

I really appreciate the help.

-PhoenixWing
 
Last edited:

Phoenix_Wing

Official Kantham Stalker
Mar 28, 2008
386
0
0
California
Oh, thats a little embarrassing... I thought the mouth thing faces toward the... oops...

How about we just keep this between you and me angel :lol:?
 

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
The contents of the for loop aren't being executed => problem with conditions or nothing inside PlayerBirthdays array.