Hello!
I have an issue where arrays spontaneously stop compiling in certain Blueprints. In this particular case, I have a type of BTTask_Blueprint that is supposed to do the following:
A) Get all actors of type from the world (will cache this instead of using an iterator later down the line)
B) For each of these actors, get their tag and compare it with the desired tag.
C) If we find the desired tag, set blackboard variables, and finish executing.
There are two paths in the example, one if we already have a current actor (Current POI), and one if we do not, as we don’t want to get the same actor twice in a row.
I can’t pinpoint exactly when the blueprint stops compiling, but it seems to be when both of the primary actor for each loops are already connected, and one of the secondary string for each loops is connected - after the second secondary loop is added, the blueprint will no longer compile.
After this point, it is impossible to get the blueprint to compile without deleting all of the array nodes - disconnecting the nodes is not sufficient and they must be removed completely.
The errors look like as follows:
Error The type of Array is undetermined. Connect something to ForEachLoop to imply a specific type.
Error The type of Array Element is undetermined. Connect something to ForEachLoop to imply a specific type.
Error The type of Item is undetermined. Connect something to ForEachLoop to imply a specific type.
Error The type of Target Array is undetermined. Connect something to ForEachLoop to imply a specific type.
Error The type of Target Array is undetermined. Connect something to ForEachLoop to imply a specific type.
Here’s an image of the blueprint itself. I’ve tried setting up a generic version using a normal blueprint, but could not reproduce this specific issue (Note answerhub makes it insanely small, but if you get the image URL and open it up in a new window it should be readable).
The issue is occurring in 4.6. I’ve googled around and only found one other reference to these error messages, and the post was quite old, without a solution
Thanks!
Luke