UDK“错误,通过上下文表达式访问类内 _ 的成员需要显式“外部””
当我尝试创建项目时,UDK 前端出现以下错误:
C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZInteraction.uc(58):错误,通过上下文表达式访问类内 GameUISceneClient 的成员需要显式“外部”
类 ZInteraction
扩展了交互
。
第 58 行是: GetSceneClient().ConsoleCommand("KEYNAME"@Key);
这里有什么问题?我仍在调查中,我会在了解更多信息后进行更新。
编辑:尝试将线路修复为 class'UIRoot'.static.GetSceneClient().ConsoleCommand("KEYNAME"@Key);
- 没有变化。
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().ConsoleCommand("KEYNAME"@Key);
- no change.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了!
来自论坛帖子,UT3 的脚本更改:
我必须将代码更改为以下内容:
GetSceneClient().
Outer.Outer.
ConsoleCommand("KEYNAME"@Key) ;
根据出现此错误的函数,您将需要一组或多组
Outer.
。您可以研究一下您的层数,或者您可以一次添加一层,直到代码编译为止。我选择了后者,因为导航这个 UnrealScript 已经足够困难了。 :)Found it!
From a forum post, Scripting Changes from UT3:
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. :)