UDK“错误,通过上下文表达式访问类内 _ 的成员需要显式“外部””

发布于 2024-08-25 10:01:26 字数 466 浏览 4 评论 0原文

当我尝试创建项目时,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

失去的东西太少 2024-09-01 10:01:26

找到了!

来自论坛帖子,UT3 的脚本更改

当访问内部类的容器类的成员时,您现在必须使用特殊的外部成员变量。这可能有助于解决名称冲突。

我必须将代码更改为以下内容:

GetSceneClient().Outer.Outer.ConsoleCommand("KEYNAME"@Key) ;

根据出现此错误的函数,您将需要一组或多组Outer.。您可以研究一下您的层数,或者您可以一次添加一层,直到代码编译为止。我选择了后者,因为导航这个 UnrealScript 已经足够困难了。 :)

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. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文