!equals versus isnot

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
333
Reaction score
58
Age
25
Location
Yes
I kinda feel like !equals isn't a thing, I dunno where I picked it up from, but now I feel like I should look in all the scripts I've done to see if I stuck that in somewhere... but just before I do that, does !equals happen to have the same function as isnot?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Code:
else if( CompareParam == "isnot" || CompareParam == "!equals" ) iCompareType = 1;
It is a thing and it's just redundancy due to convention... Thankfully we did not carry it so far as to have an "!isnot". ;)

There's also "!startswith" and "!contains" (ie. does not start with "x" or does not contain "x").

I've come across a few situations where an $if(<val>,<comp>,<val>) function would make things a bit shorter, but I've not implemented it, and of course, we're still stuck with one comparison per if statement, though, unlike VS2003 C++, you can "else if" until the end of eternity in MSC scripts, as far as I know.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
333
Reaction score
58
Age
25
Location
Yes
Phew. Saved me a bit of time checking everything :p
Thank you
 
Top