Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 21st, 2017, 11:20 AM
Is there a syntax that allows multiple conditionals for an if or a validif? I want to do something like this:
Code:
validif ((field[trtUser].value <> 3) and (field[trtUser].value <> 5))
or this:

Code:
if ((field[trtUser].value <> 3) and (field[trtUser].value <> 5)) then
   @valid = 0
    endif
I ended up using this:

Code:
if (field[trtUser].value = 3) then
   @valid = 0
elseif (field[trtUser].value = 5) then
   @valid = 0
else
   @valid = 1
    endif
And that works, but I'm still curious if it's possible to use multiple conditionals in a single if statement.
EightBitz is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 21st, 2017, 11:35 AM
No, you can't combine them like you wanted to (unless you can write things as a tagexpr[] inside a single if () then, since a tagexpr can handle more complex logic).
Mathias is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:57 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.