Heres what I need to do , Keep track of a name and an index number in a server application . I tried at first to do it in a text file , but I found it to hard to to parse the text and just plain complicated . "but heh is'nt it all?"
Ok so I then thought I could store it in an array , but I dont know much about them . So I read a bit . It sounds like it'll work but Im not sure How to implement it . So I tried to make my own (Type) I did this in a .bas module . Is it right?
In general Declare
-----------------------
Public Type usrArray
sTemp As String
iCount As Integer
End Type
Dim allusers(1 To 10) As usrArray
---------------------
Public Sub addUser(socknum As Integer, nick As String)
usrCounter = usrCounter + 1

allusers(usrCounter).sTemp = "nick"
allusers(usrCounter).iCount = socknum
msgbox allusers(usrCount)
End Sub
---------------------

I was hoping that
----------------------
Public Type usrArray
sTemp As String
iCount As Integer
End Type
Dim allusers(1 To 10) As usrArray
----------------------
would give me an array of 10 items each containing a string and an integer . Back in the main form at the event I put
Call addUser(index, nick) and I Get an Error saying Only user defined types defined in public modules can be coherced to or from a a variant but its supposed to be an array ? So Im confused .
Is someone willing to attempt to explain to me what I need to understand and fix this Problem ?

Once again Im trying to sore a string and a number in an array that I can increase in size to match the number of people on the server .
Thanks ,
[]PRIVATE




[Edited by PRIVATE1 on 08-15-2000 at 11:09 AM]