Jump to content


Photo

Checking for an item in a form list


  • Please log in to reply
1 reply to this topic

#1 IWantMyMod

IWantMyMod

    Prisoner

  • Members
  • 15 posts

Posted 07 April 2018 - 09:04 PM

What is the easiest way to check for an item in the FormList?

 

Do I need to integrate over the list and check each item or is there a simpler way?


  • 0

#2 zilav

zilav

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 353 posts

Posted 08 April 2018 - 01:01 AM

Yes, you need to iterate over an array's elements and do appropriate comparison. Since arrays in xEdit can contain elements of any types (like simple record links in FLST and keywords, or structures of elements in conditions CTDA list), there is no "IndexOf" or similar function.


  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users