Insanely High amount of AccessedNones..

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

Dark[NSF]

Northwest Secessionalist Forces
This is my PlayerReplication.uc, basicly just refreshes the amount of Credits a player has... I am getting this AccessedNone Error, about 1mb per 5min


Warning: nsfPlayerReplicationInfo DM-Aztec[FuT]rev1.nsfPlayerReplicationInfo (Function nsf.nsfPlayerReplicationInfo.Tick:000A) Accessed None


Code:
simulated function PostBeginPlay()
{
	Super.PostBeginPlay();
	if ( Role < ROLE_Authority )
	{
		InitialState = 'CreditsProxy';
		GotoState('CreditsProxy');
	}
	else {
		InitialState = 'CalculateCredits';
	}
}


simulated function Tick(float DeltaTime)
{
    if ( ( Controller.Pawn == Pawn ) )
    {
	CurCredits = credits;
	credits = FMax(0, credits);
    }
    else
    {
    return;
    }
}


// server state
state CalculateCredits
{
	function Tick(float DeltaTime)
	{
	//if ( Controller == None )
		//Destroy();
		//return;

	Global.Tick(DeltaTime);
		
		CurCredits = credits;
		credits = FMax(0, credits);
	}

    	//if (Pawn.Health >= 1)
    	//{
	//	SetTimer(timeforcredits, false);
	//	credits += creditsovertime;
    	//}
}


function Reset()
{
	Super.Reset();
	credits = default.credits;
}



// client state
state CreditsProxy
{
	simulated function Tick(float DeltaTime)
	{
		Global.Tick(DeltaTime);
	}
}


Any clue?

BTW, Thanks to the JumpStats Mod. I was able to get this far. ;)
 
Last edited:

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Warning: nsfPlayerReplicationInfo DM-Aztec[FuT]rev1.nsfPlayerReplicationInfo (Function nsf.nsfPlayerReplicationInfo.Tick:000A) Accessed None
You could have guessed from the message: The Accessed None happened in the Tick() function of the nsf.nsfPlayerReplicationInfo class, and there's only one access to an object's property in it: "Controller.Pawn"
If Controller is None this results in an Accessed None, that easy.

(see UnrealWiki: Log Warnings)

Also: Please post only relevant parts of your code.