EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin

.do body cannot resolve return parameter

Abierto
#40 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
138
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.