UDK "Error, Accessing a member of _'s within class through a context expression requires explicit 'Outer'"
I get the following error in the UDK Frontend when I try to make my project:
C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZInteraction.uc(58) : Error, Accessing a member of GameUISceneClient's within class through a context expression requires explicit 'Outer'
The class ZInteraction
extends Interaction
.
Line 58 is: GetSceneClient().ConsoleCommand("KEYNAME"@Key);
What is the problem here? I am still investigating and I will update as I find out more.
edit: Tried fixing the line up as class'UIRoot'.static.GetSceneClient().Con开发者_JAVA技巧soleCommand("KEYNAME"@Key);
- no change.
Found it!
From a forum post, Scripting Changes from UT3:
When accessing a member of a within class' container class, you now have to use the special Outer member variable. This presumably helps deal with name clashes.
I had to change the code to the following:
GetSceneClient().
Outer.Outer.
ConsoleCommand("KEYNAME"@Key);
Depending on what function is giving you this error, you will need one or more sets of Outer.
. You can research to find out how many layers deep you are, or you can just add one at a time until the code compiles. I chose the latter, because it's hard enough already to navigate this UnrealScript. :)
精彩评论