Let's say I have an array of strings and want to make an "if statement" that goes through the entire array and checks if anything match,
how would this be done in a BMS script?
Check all strings in array for use with an if statement in BMS script.
-
- Posts: 290
- Joined: Fri Mar 30, 2018 2:48 am
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Check all strings in array for use with an if statement in BMS script.
Code: Select all
getarray STRINGS 0 -0x80000000
for i = 0 < STRINGS
getarray STR 0 i
if STR & "search"
print "%STR%"
endif
next i
-
- Posts: 290
- Joined: Fri Mar 30, 2018 2:48 am
Re: Check all strings in array for use with an if statement in BMS script.
aluigi wrote:Code: Select all
getarray STRINGS 0 -0x80000000
for i = 0 < STRINGS
getarray STR 0 i
if STR & "search"
print "%STR%"
endif
next i
Thank you.
