Currently i am using directplay 8.0. I tried the following code, but it return me an error msg saying Object variable or With block variable not set. I would like to know this error is due to what reason and how i can rectify the problem.

VB Code:
  1. Private Sub cmdTerminate_Click()
  2. Call DirectPlay8Event.DestroyPlayer(udtPlayers(index).lngPlayerID, 1, False)
  3. End Sub