Comparing multiple strings in If
A bit of a noob question here. I'm wanting to check what viewport the user is in using an if statement.
So:
currentView = (viewport.getType() as string)
if currentView == "view_top" then
(
THINGS!
)
Which is fine, so I wanted to check if the condition is true for multiple views using:
if currentView == "view_front" or "view_left" then
(
THINGS!
)
But it does not work. I've been trying to search how but using "or" within Google search strings isn't that helpful.
Any help would be awesome!
Comments
Oh I see! Thank you ever so
Oh I see! Thank you ever so much!
Boolean operations.
Boolean operators test between conditions (boolean values). Your code is testing between a condition and a string.
if currentView == #view_front OR currentView == #view_left then ...