Results 1 to 3 of 3

Thread: Help with code placement

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Exclamation Help with code placement

    Hi, wher i tend to use
    User(Index).Item(ItemNo) = -1
    effects the code.

    where it is now, i dont get the msg "you stashed a"
    and if i use it at the end then i dont get the last msgbox saying false, and this
    might be why its not saving properly.

    dont need the msgboxes, just added them to test it.

    can somebody help sort it out

    VB Code:
    1. Public Sub Sta****em(Index As Integer, ByVal ItemNo As Integer)
    2. On Error Resume Next
    3.  
    4. 'MsgBox Item(User(Index).Item(ItemNo)).IName
    5. 'MsgBox Item(User(Index).Item(ItemNo)).OnPlayer
    6.  
    7. User(Index).Item(ItemNo) = -1
    8. frmMain.wsk(Index).SendData Chr$(2) & "You just stashed a " & Item(User(Index).Item(ItemNo)).IName & vbCrLf & vbCrLf & Chr$(0)
    9. Item(User(Index).Item(ItemNo)).OnPlayer = False
    10. Call UpdateSingleItem(Index, ItemNo)
    11. Call UpdateGeneralInfo(Index)
    12.  
    13. 'MsgBox Item(User(Index).Item(ItemNo)).OnPlayer
    14.  
    15. End Sub
    Last edited by totaly; Jan 10th, 2007 at 09:38 AM. Reason: filtered word is actually stash item

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Help with code placement

    first thing to do is to get rid of On Error Resume Next, then see what your code does.

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

    Re: Help with code placement

    Quote Originally Posted by bushmobile
    first thing to do is to get rid of On Error Resume Next, then see what your code does.
    Once you have gotten rid of it, never put it back.

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