Sign in to follow this  
xivVerge

Not operator

Recommended Posts

Hi there, i've upgraded to version 2.14.1 and noticed that the not (!) operator is no longer working in if statements. I always get "Expected expression value" errors. Is it just a config thing or has the parser changed? Thanks, Tim

Share this post


Link to post
Share on other sites
A simple example is the following:


class Test
{
bool isTrue() { return true; }

void test()
{
if ( !isTrue() )
print("false");
else
print("true");
}
}

Test t;



I can rewrite the if statement to get it working:

class Test
{
bool isTrue() { return true; }

void test()
{
if ( isTrue() != true )
print("false");
else
print("true");
}
}

Test t;



Regards,
Tim


Share this post


Link to post
Share on other sites
I am not sure why. It is perhaps some ANSI requirement. BTW you don't specify which tool you are talking about (version 2.13.1 of what?) and the language you are using. Probably C++ ?

Share this post


Link to post
Share on other sites
Quote:
Original post by VinzO
BTW you don't specify which tool you are talking about (version 2.13.1 of what?) and the language you are using. Probably C++ ?

Give that this is the AngelCode forum, you can assume the language is AngelScript.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this