Announcement

Collapse
No announcement yet.

Boolean logic no longer Boolean?!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Boolean logic no longer Boolean?!

    This is about as strange as it gets...
    Code:
    // clearing the item array
    for (i = 0; i < ItemArray.Length; i++)
    {
        ItemArray[i] = true;
        log(ItemArray[i]);
    }
    ItemArray has a length of 10 (not that it matters).
    When I run this code, it generates a log like this:

    False
    False
    False // etc etc etc

    What the heck am I doing wrong?! This seems crazy...

    #2
    You sure there aint any !s anywhere in there?
    I sure don't see anything wrong with the stuff you posted.

    Comment


      #3
      I read somewhere that bool arrays don't work at all (for what reason I do not know), try changing it to int array and assigning 1/0 as true/false.

      Comment


        #4
        Yeah, I'm pretty sure the problem is that bool arrays just don't work! I just wanted to verify that was a problem, and it looks like it is!

        I'll switch to byte and things should be fine. Thanks!

        Comment

        Working...
        X