EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin

.do body cannot resolve return parameter

Aperta
#40 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
138
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.