20-09-2008, 04:41 AM
Code:
Sub SendChars(ByVal Index As Long)
Dim Packet As String
Dim i As Long
Packet = "allchars"
For i = 1 To MAX_CHARS ' Race System Addition
Packet = Packet & SEP_CHAR & Trim$(Player(Index).Char(i).Name) & SEP_CHAR & Trim$(Class(Player(Index).Char(i).Class).Name) & SEP_CHAR & Player(Index).Char(i).Race & SEP_CHAR & Player(Index).Char(i).Level ' Error in Code
Next i
Packet = Packet & END_CHAR
Call SendDataTo(Index, Packet)
End Sub
The Packet Part when you look it up in the debugger it shows the Trim$(Player(Index).Char(i).Name) as dmin and spaces then the SEP_CHAR so I am trying to track down where it removes the Starting a in the admin.
After that it doesnt have the Class Name it says it is out of bounds and it pulls up the Race/Level As numbs 4 and 0.
Note - I did rewrite the code and changed it around little bit then what you have here. Now I can create a new user and you get another issues.
The issue is with this you can make a new account but when you log into it you get a Run Time Error 13
It is under the Case mark of AllChars
Code:
Level = CLng(Parse(n + 2))