Does this scripting statement do what I think (hope) it does

Post » Wed May 02, 2012 1:17 pm

Does this:

If lCurrentFatigue != (lCurrentFatigue > lBaseFatigue)

...mean if current fatigue is not greater than base fatigue??
User avatar
Amysaurusrex
 
Posts: 3432
Joined: Wed Aug 09, 2006 2:45 pm

Post » Wed May 02, 2012 8:41 pm

I don't think that's how it works.

lCurrentFatigue > lBaseFatigue

will return 1 (true) if lCurrentFatigue is larger than lBaseFatigue. Otherwise it will return 0 (false).

So the whole statement is

If lCurrentFatigue != 1

in the first case and

If lCurrentFatigue != 0

in the latter.
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Wed May 02, 2012 11:28 am

You wanna know if it is less than or equal to?

If lcurrentfatigue <= lBaseFatigue

Will do what you want.
User avatar
Dark Mogul
 
Posts: 3438
Joined: Tue Feb 20, 2007 11:51 am

Post » Wed May 02, 2012 2:27 pm

I don't think that's how it works.

lCurrentFatigue > lBaseFatigue

will return 1 (true) if lCurrentFatigue is larger than lBaseFatigue. Otherwise it will return 0 (false).

So the whole statement is

If lCurrentFatigue != 1

in the first case and

If lCurrentFatigue != 0

in the latter.

Okay. That clears that up for future reference. Thanks.

You wanna know if it is less than or equal to?

If lcurrentfatigue <= lBaseFatigue

Will do what you want.

Yeah. That was a major brain fart on my part. I knew that (really, I did). Thanks again, 'Ol Reliable.
User avatar
Justin Hankins
 
Posts: 3348
Joined: Fri Oct 26, 2007 12:36 pm

Post » Wed May 02, 2012 6:28 pm

Okay. That clears that up for future reference. Thanks.



Yeah. That was a major brain fart on my part. I knew that (really, I did). Thanks again, 'Ol Reliable.

Too early in the morning? Not enough coffee yet? Yep. Been there, done that. :D
User avatar
Daniel Holgate
 
Posts: 3538
Joined: Tue May 29, 2007 1:02 am

Post » Wed May 02, 2012 9:07 pm

Too early in the morning? Not enough coffee yet? Yep. Been there, done that. :D

:)

Yeah, I didn't have near enough coffee.
User avatar
Mariaa EM.
 
Posts: 3347
Joined: Fri Aug 10, 2007 3:28 am


Return to IV - Oblivion