Click to See Complete Forum and Search --> : Multiple Variable Call W/ OR Not Working


theflyingminst
03-01-2009, 09:19 AM
Hi, I am dumbfounded. This is the weirdest/simplest problem I've ever had:

yr is definitely equal to 44 and i is definitely equal to 42 but when I call this If statement together with both it doesn't output properly.

Is there something I am overlooking?

If yr <> 44 OR i <> 42 then..


Thank you

theflyingminst
03-01-2009, 09:47 AM
Oh snap, forget it. Just a stupid little coding error.

Kuriyama
03-02-2009, 11:29 AM
Just a heads up. VBScript uses a variant data type, which is bad and stupid IMO. What this means is that sometimes it will get confused when you set numbers into variables. It will attempt to compare the number as a string.

Thus.

i = "1"

if i > 0 then
. . .
end if

would not work as expected.