Results 1 to 5 of 5

Thread: [2008] Couple Problems

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    53

    [2008] Couple Problems

    First one is this error, probably really simple to fix: "Reference to a non-shared member requires an object reference"

    I get it when I try to remove an item in a list

    At the top of the code:
    vb.net Code:
    1. Public shotList As New List(Of Shot)
    2. Public shotIndex As Int32

    Then in my structure:
    vb.net Code:
    1. If life >= distance Then
    2.                 shotList.RemoveAt(shotIndex)
    3.             End If


    The second one is a bit weirder, I have a variable that doesn't want to me altered. http://www.vbforums.com/showpost.php...5&postcount=11

    Any help would be greatly appreciated

  2. #2

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    53

    Re: [2008] Couple Problems

    Figured out the first one, that was an easy one, lol. Although I'm still stummped on the second one (the link), it looks like no variable in the updateshot sub in teh shot structure will accept any values.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2008] Couple Problems

    What did you do to fix the first one?

  4. #4

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    53

    Re: [2008] Couple Problems

    The part that was in the structure should have been in the progresschanged sub.

  5. #5

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    53

    Re: [2008] Couple Problems

    The variables in the structure in the list keep resetting each time they are called, is there somthign special you have to do to set a variable of a list item?

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