Results 1 to 4 of 4

Thread: about to get crazy, help

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    about to get crazy, help

    I have this:
    PHP Code:
    // Make sure the value is at least 0
    if (intensityCount[curIntensity]<0intensityCount[curIntensity]=0;
    // Add one
    intensityCount[curIntensity]++;

    // Sometimes the debugger stops here!!!!
    if(intensityCount[curIntensity]==0System.Diagnostics.Debugger.Break(); 
    and here's how the array is declared:
    byte[] intensityCount= new byte[255];


    I don't understand what MIGHT be possibly wrong. I'm assuring the element of the array has a value of at least zero. Then adding 1 to it, and it's still ZERO?!!!! what the heck?? any ideas?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Not sure if its just a problem with 'byte's, but have you tried:
    PHP Code:
    // Add one 
    intensityCount[curIntensity]+=1
    ?

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by «°°phReAk°°»
    Not sure if its just a problem with 'byte's, but have you tried:
    PHP Code:
    // Add one 
    intensityCount[curIntensity]+=1
    ?

    Phreak
    yeah , even tried adding a really big number besides 1... still happened....I wasn't making an obvious mistake or anything. I looked at the code for 1 hour and couldnt figure it out... so I just deleted the whole thing problem resolved
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Originally posted by MrPolite
    I looked at the code for 1 hour and couldnt figure it out... so I just deleted the whole thing problem resolved
    You softy

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width