EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin

.do body cannot resolve return parameter

オープン
#40 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
138
フォーク
22
PR マージ指標
30日以内にマージされた PR はありません

説明

**UE4 Version**
4.24

**SkookumScript Version**
4.24.03

**Describe the bug**
For the following code that has 2 return parameters, the body of the `do` is unable to see the `intersection` variable. The syntax error is that the identifier does not exist in the current scope.
```javascript
(Transform start_t, Transform end_t; Vector3 plane_normal, Vector3 intersection)
[
plane_normal : Vector3!
intersection : Vector3!

!plane_normals : {end_t.unit_axis_x end_t.unit_axis_y end_t.unit_axis_z}
!dist : 1000.0

// Find X distance
plane_normals.do
[
!end1 : start_t.@translation + [start_t.unit_axis_x * dist]
!end2 : start_t.@translation - [start_t.unit_axis_x * dist]

if MathLib.line_plane_intersection_origin_normal(start_t.@translation,
end1,
end_t.@translation,
item,
0.0,
intersection)
[
println("Plane normal for X is: ", item)
]
else
[
if MathLib.line_plane_intersection_origin_normal(start_t.@translation,
end2,
end_t.@translation,
item,
0.0,
intersection)
[
println("Plane normal for X is: ", item)

]
]
]
]
```

**Expected behavior**
Return parameters should be captured when iterating with `.do`

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Unreal Engine 4.24 で SkookumScript 4.24.03 を使用して例を再現し、その後、`.do` が戻りパラメーターのスコープをどのように確立するかを追跡します。`intersection` が `.do` 本体内で解決され、例で不明な識別子の構文エラーが報告されなくなれば、Issue は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, unreal-engine
領域
compilers, game-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。