PDA

Click to See Complete Forum and Search --> : Terminating a player connection


winsonlee
Oct 1st, 2002, 09:36 PM
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.



Private Sub cmdTerminate_Click()
Call DirectPlay8Event.DestroyPlayer(udtPlayers(index).lngPlayerID, 1, False)
End Sub

Mushroom Realm
Oct 2nd, 2002, 10:52 PM
its saying that the player doesnt exist, try using (index - 1)

Zaei
Oct 2nd, 2002, 10:59 PM
DirectPlay8Event is an object type, not an object. You have to create an instance of the object in an appropriate way before you can use it.

Z.