• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Achievement Stat/Function Reading

FluX

Grizzled Veteran
Oct 26, 2010
5,378
234
www.fluxiserver.co.uk
Hey, i'm trying to implement it for one of my stats for a custom perk for when they survive a wave. Now the problem is, i'm getting errors.

Gametype:
Code:
        if ( Level.NetMode != NM_StandAlone && Level.Game.NumPlayers > 1 &&
             SurvivorCount == 1 && Survivor != none && KFSteamStatsAndAchievements(Survivor.SteamStatsAndAchievements) != none )
        {
            KFSteamStatsAndAchievements(Survivor.SteamStatsAndAchievements).AddOnlySurvivorOfWave();
        }
		// Addition for the Survivor waves survived.
		else ( KFPlayerReplicationInfo(Survivor.PlayerReplicationInfo).ClientVeteranSkill == class'SRVetSurvivor'  && Survivor != none )
			ServerStStats(Survivor.SteamStatsAndAchievements).AddSurvivorWave();

Error:
Error, 'ServerStStats': Expression has no effect

I don't understand why i'll get this error if i'm calling a function from another class file. Any ideas?
 
Does AddSurvivorWave() returning a class or something like a bool or int?

An int like the other stat functions.

Code:
function AddSurvivorKill()
{
	local int Amount;

		Amount = 1;

	bHasChanged = true;
		Amount = Amount * MutatorOwner.ExperienceScaling;
	Rep.RSurvivorKills += Amount;
	if( MyStatsObject!=None )
		MyStatsObject.SurvivorKills+=Amount;
	DelayedStatCheck();
}
 
Upvote 0
Hey, i'm trying to implement it for one of my stats for a custom perk for when they survive a wave. Now the problem is, i'm getting errors.

Gametype:
Code:
        if ( Level.NetMode != NM_StandAlone && Level.Game.NumPlayers > 1 &&
             SurvivorCount == 1 && Survivor != none && KFSteamStatsAndAchievements(Survivor.SteamStatsAndAchievements) != none )
        {
            KFSteamStatsAndAchievements(Survivor.SteamStatsAndAchievements).AddOnlySurvivorOfWave();
        }
		// Addition for the Survivor waves survived.
		[COLOR="Red"]else[/COLOR] ( KFPlayerReplicationInfo(Survivor.PlayerReplicationInfo).ClientVeteranSkill == class'SRVetSurvivor'  && Survivor != none )
			ServerStStats(Survivor.SteamStatsAndAchievements).AddSurvivorWave();

Error:


I don't understand why i'll get this error if i'm calling a function from another class file. Any ideas?

should be there else if instead of else?

Edit: Ups didn't saw FZFalzar already mentioned :(
 
Last edited:
Upvote 0