Results 1 to 9 of 9

Thread: Problem with do.... loop

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    98

    Problem with do.... loop

    Code:
    x = 0
            Do Until x = users.Length
                'MsgBox("" & i & " " & x & " " & uid & "")
    
                If users(x) = uid Then
                    spam2 = (spam2.Substring(spam2.IndexOf(inner)))
                    MsgBox("MULTIPLE PERSON DETECTED")
    
                    Exit Do
                Else
                    If users(x) = users.Length Then
                        Exit Do
                    End If
    
                End If
                x = x + 1
    
            Loop
    using that do statement, im searching through an array, is seems to work because it picks up about the first 2 doubles, anyone know what i can do to fix this? or if theres a a problem with the syntax?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    So it works, but you don't want it to?

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Yes what exactly is the question?

    It might be easier if you used a for each loop also:
    VB Code:
    1. Dim user As Object 'since your code doesn't show its type
    2. For Each user in users
    3.    If user=uid Then
    4.        spam2 = (spam2.Substring(spam2.IndexOf(inner)))
    5.        MsgBox("MULTIPLE PERSON DETECTED")
    6.        Exit For
    7.    End If
    8. Next

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    98
    Hmmm, sorry, power just came back...


    now, that part of the code works finds like 2 users, but then after that, it just doesnt seem to search the rest of the array

    Edit: users is an array

  5. #5
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Azkar
    Hmmm, sorry, power just came back...


    now, that part of the code works finds like 2 users, but then after that, it just doesnt seem to search the rest of the array

    Edit: users is an array
    hehe power came back? hmmmm!!

    you should explain more. People don't always give you nice answers if you don't fully explain what you're talking about
    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!!

  6. #6
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Originally posted by MrPolite
    hehe power came back? hmmmm!!
    Not that funny dude, i can guess where azkar comes from and there going out the electricity power is not at all unusual.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    98
    right, big storm over here

  8. #8
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    ooh sorry I thought you were talking about the power of your brain

    where do you live?
    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!!

  9. #9

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    98
    Pittsburgh

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