- Joined
- Jan 26, 2014
- Messages
- 1,281
- Reaction score
- 106
- First Language
- Irish
- Primarily Uses
- N/A
I was just thinking if there's a downside doing recursion, or checking all the values of an array for a certain value. For example, we have Battle Members or Party members.
$gameParty.battleMembers()If I want to check if anyone of them has this or that, I'd have to use a for loop, extract each member and then do an if statement saying that if this current index member has this state, then do this.
Is making a loop, checking each value and then doing a condition has a downside? Are there specific or a more professional approach in checking?
$gameParty.battleMembers()If I want to check if anyone of them has this or that, I'd have to use a for loop, extract each member and then do an if statement saying that if this current index member has this state, then do this.
Is making a loop, checking each value and then doing a condition has a downside? Are there specific or a more professional approach in checking?
