Given the above classes=["A","B"] defined in init.sqs the line
?(_class in classes): _vehicle exec "script.sqs"
works just fine for me as long as _class has a
string value such as "A".
By "works just fine" I mean that "_class in classes" is true and script.sqs gets run.
So, the question is: are you sure that the variable _class in your code really
is string-valued?
A couple of notes:
- _class = A; no good for what you want (means that _class refers to an object with name "A")
- _class = "A"; would work.
Wild guessing here: you're not putting the whole ?-expression above as a
condition in a trigger, are you? That would be, well, strange...
(Just "_class in classes" is OK, of course)
Hope I'm not just stating things you already know...