EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin
.do body cannot resolve return parameter
- Langage dominant
- C++
- Étoiles
- 138
- Forks
- 22
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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`
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez l’exemple dans Unreal Engine 4.24 avec SkookumScript 4.24.03, puis suivez la manière dont `.do` établit la portée des paramètres de retour. L’issue est terminée lorsque `intersection` est résolu dans le corps de `.do` et que l’exemple ne signale plus d’erreur de syntaxe due à un identifiant inconnu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp, unreal-engine
- Domaine
- compilers, game-dev
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100