I’ve created an array of the type creative_prop. This array has 4 values.
I’m writing a condition where I want to compare the rotation value of each prop, and if they are within a range, I will take it as correct. This is how my code flows -
In the final print, The Rotation1 and Rotation2 values are throwing an “Unknown Identifier” error.
If I remove the if condition of setting the rotation values, I get an error - This invocation calls a function that has the ‘decides’ effect, which is not allowed by its context. The ‘decides’ effect indicates that the invocation calls a function that might fail, and so must occur in a failure context that will handle the failure. Some examples of failure contexts are the condition clause of an ‘if’, the left operand of ‘or’, or the clause of the ‘logic’ macro."
Doesn’t work. If you see the attached image, I’ve used rotation in the “MoveBlock” loop, where there is no error. But the error appears in the CheckForMatch function.
I know this is old, but “Unknown identifier” is telling you that your variable/constant doesn’t exist at that scope. If you define it inside the “if” block, it doesn’t exist anywhere else. Instead, you’ll want to either declare the variable before the if block or use it (print it) before exiting the if block.