EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin
.do body cannot resolve return parameter
- Dominant language
- C++
- Stars
- 138
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
**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`
Contributor guide
Assessment
This issue has not been assessed yet.