i get the error invalid access of index 4 on array
For context, currentoperation and total blocks are integers, main equation is a array
what i’m trying to do is get the value stored in mainequation array using current operation.
Also i don’t know how to convert this text to script so maybe a little help with that
If your array contains 4 elements you can’t reach to index 4, because indexers start from 0, so the fourth element will be index 3, you need to end your while loop before:
while currentoperation < mainequation.size():
Also when posting on forum, use the </> button in the text editor to format your code, its hard to read as is, also i recommend using _ to separare the words from your variables, makes easier to read.
So the array ends 1 digit early right? So since my equation was 5+5: and it counted as 3 terms as it started from 0. Got it! And about that variable u mean Variable_Name right? Yea I’m out of practice of that I’ll fix that. Thanks for your answer