PDA

View Full Version : Help, UDK Make... Warning, Import failed for '...': property is config



aveeric
11-10-2009, 10:56 PM
I can’t seem to figure out why i am getting an “Import failed, property is config” warning and as a result default properties are not assigned to my config variables. The only way to get values assigned to my config variables is to create a config file for each class, but this defeats the purpose of having default property values in the DefaultProperties function. To add a twist it appears that this warning/issue was present in an earlier UT3 release and fixed in the 1.2/1.3 patch/version.

See the end of these posts for patch fix confirmation: http://utforums.epicgames.com/showthread.php?t=629102
http://www.3dbuzz.com/vbforum/showthread.php?p=1371454

The Class code below produces this:
Warning, Import failed for 'iListenPort': property is config (Check to see if the property is listed in the DefaultProperties. It should only be listed in the specific .ini/.int file)


/**
* Example game type for UDK mod making
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class SuperFunGame extends UTDeathmatch
config(SuperFunGame);

var config int iListenPort;

/**
* Send an announcement to the killer for every kill
*/
function Killed( Controller Killer, Controller KilledPlayer, Pawn KilledPawn, class<DamageType> DamageType )
{
`log("SUPER FUN KILL by "$Killer);
if ( PlayerController(Killer) != None )
{
PlayerController(Killer).ReceiveLocalizedMessage( class'UTKillingSpreeMessage', 5, Killer.PlayerReplicationInfo, None );
}
Super.Killed(Killer, KilledPlayer, KilledPawn, DamageType);
}

/**
* Don't override this gametype if chosen as DefaultGameType in .ini or on command line
*/
static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
{
return default.class;
}

defaultproperties
{
iListenPort=3000
}

If I comment out the iListPort=3000 line then the warning goes away but i want to set default values when the config is not available. I would think that if this issue was fixed in a UT3 patch released before Oct 2007 (based on referanced posts) that it would have made its way into the UDK Nov 2009 release? Does anyone know how to fix this issue??

Any help would be appreciated
Eric

decko
11-11-2009, 04:31 AM
In Unreal Engine 3 you are not allowed to specify defaultproperties for config variables. If this doesn't generate a warning in UT3, it's a bug :).

http://udn.epicgames.com/Three/UnrealScriptReference.html#New%20in%20Unreal%20Eng ine%203

Look at the default properties bullet.
So you just have to make the config file as you go. In this way you won't forget to make the ini before releasing the game. So it's not that bad after all.

elmuerte
11-11-2009, 10:52 AM
In Unreal Engine 3 you are not allowed to specify defaultproperties for config variables. If this doesn't generate a warning in UT3, it's a bug :).
No, it UT3 it was specifically supported to allow setting of config and localization values in the defaultproperties for mod support. Otherwise there was no way to communicatie this information properly to clients that didn't have the mod installed.

aveeric
11-11-2009, 11:17 AM
Correct, see here in the 1.1 patch release notes in the modding section at the end.

http://utforums.epicgames.com/showthread.php?t=591638

"- Shipping script compiler now allows localized/config defaultproperties because otherwise autodownloaded mods have no way for their localized/config variables to work."

Now this is why im confused, was the 1.1 patch not included in the UDK November release??

Wormbo
11-11-2009, 11:22 AM
IMHO embedding default values for config/localized variables should really be up to the author. Forcing it to always be specified in INI/localization files slows down dev progress. In UE1/2 you could dump default settings or localized variables via commandlets.

elmuerte
11-11-2009, 04:32 PM
Now this is why im confused, was the 1.1 patch not included in the UDK November release??

UT3 uses a much much much older version of UE3 than the UDK. Changes to the engine of a game do not always go back to the core engine branch.

aveeric
11-11-2009, 05:18 PM
Wait… hold on a sec, your suggesting that none of the 1.1, 1.2 or 1.3 UT3 patch(s) released starting in 2007 made their way into the UDK release in November of 2009. That sounds a bit weird; one would think that they (Epic) would want to use the latest code forward in the tree to resolve issues like this when they decide to do future releases of the game engine\compiler say for FREE... ;)

Either way, this sucks.... I have a bunch of script originally written for UT3 that I want to use with UDK and now I have to go through it and make a branch in my code. Watch, with my luck I’ll do all the code changes and then in December there will be a new UDK release with the patch(s) applied. I just wish there was an easy fix to the problem so I don’t have to change a bunch of code.

Wormbo
11-12-2009, 06:34 AM
It's just really the defprops, right? You can use the preprocessor for that instead of actually branching your code.