Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SavePlayer Faster
#12
Fox Wrote:Fix?
I use this:
Code:
Sub SavePlayer(ByVal Index As Long, ByVal cNum as Byte)
Dim FileName As String
Dim n As Long

    cNum = int(cNum)
    FileName = App.Path & "\accounts\" & Trim(Player(Index).Login) & ".ini"
    
    Call PutVar(FileName, "CHAR" & cNum, "Name", Trim(Player(Index).Char(cNum).Name))
    Call PutVar(FileName, "CHAR" & cNum, "Class", STR(Player(Index).Char(cNum).Class))
    Call PutVar(FileName, "CHAR" & cNum, "Sex", STR(Player(Index).Char(cNum).Sex))
...

End Sub
Code:
Call SavePlayer(Index, CharNum)
Just the way I do it, =P. May not be the best.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)