Code: Select all
Error: C:\GOG Games\Unreal Gold\RPG_Game_dev\Classes\RPG_PlatformPawn.uc(150) : Error, Unrecognized member 'StatsActivated' in class 'Class'
Error: C:\GOG Games\Unreal Gold\RPG_Game_dev\Classes\RPG_PlatformPawn.uc(150) : Error, '(': Expression has no effect
Error: C:\GOG Games\Unreal Gold\RPG_Game_dev\Classes\RPG_PlatformPawn.uc(150) : Error, Missing ';' before ')'
Code: Select all
var bool bNeedsStatsSaved;
var class<RPG_GameMutator> CustomMut;
event UpdateStats()
{
CustomMut = class'RPG_GameMutator';
if ( bNeedsStatsSaved == true && Level.Game.MutatorClass == class'RPG_GameMutator' )
CustomMut.StatsActivated();
bNeedsStatsSaved = false;
}
I would assume that the following quote might have something to do with this, but I don't quite understand what I'm reading:
Unfortunatly it does not work. I tried it out myself, you cant typecast (metacast / reference typecast) actor references to object references or vice versa OR (like in the example) object reference to object reference, because Objects don't exist in a map, they exist in a raw UnrealEngine environment. You can only reference to an object of that class by using the "new" command creating a new object instance of that class. Checking if a class (typecasted or not) is NOT none is save, because it's indeed none, but won't get you anything after "if (expression != none)". Always use new command or the dynamicloadobject function for these.