Here’s are my if statements:
They have to be in this specific order. Is there a simpler way of doing this? Thanks!
Here’s are my if statements:
They have to be in this specific order. Is there a simpler way of doing this? Thanks!
I wouldn’t be too worried over this, it’s fine. You might be able to set all the nils with a loop, say each one of the arrays is inside of another array, you can then loop over all the arrays and set each one to nil. Though it depends on how your code and data is structured and stored.
Something similar to this:
for i, v in selectedRods do
for _, Array in ipairs(BunchOarrays) do
if Array[i] then
Array[i] = nil
end
end
end
It depends on what you want to do though.
Also, I dont think you need to have the if statements, If an array[i] is nil (meaning the if statement does not run) setting it to nil has no effect. If array[i] == nil
, then setting array[i] = nil
does not change anything. Is there an error or problem the if statement solves?
Happy Coding
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.