Mirage Source http://web.miragesource.net/forums/ |
|
Crap. http://web.miragesource.net/forums/viewtopic.php?f=201&t=3866 |
Page 1 of 1 |
Author: | James [ Fri Jun 20, 2008 11:47 pm ] |
Post subject: | Crap. |
So, I've got the PW Converter for PW files to the new version, and I've discovered it work perfectly! After designing a DATABASE editor I was able to discover that everything is being converted normally, yet my code is reading something differnet. It happens in Code: Function GetPlayerInvItemNum(ByVal Index As Long, ByVal InvSlot As Long) As Long GetPlayerInvItemNum = Player(Index).Char(Player(Index).CharNum).Inv(InvSlot).Num End Function Instead of Getting "8" as it should be, and as my database editor does, it is getting a large number "838860800" Now, there is nothing else remotely close to that in the original INI file, so it isnt being converted incorrectly, it's just not loading properly. Any idea why? Here is how I load both in the Db Editor and in the server if that matters. Server: Code: Sub LoadPlayer(ByVal Index As Long, ByVal Name As String) Dim FileName As String Dim f As Long Dim StartByte As Long Call ClearPlayer(Index) FileName = App.Path & "\data\accounts\" & Trim$(Name) & ".act" f = FreeFile Open FileName For Binary As #f Get #f, , Player(Index).Login Get #f, , Player(Index).Password Get #f, , Player(Index).Char(1) Get #f, , Player(Index).Char(2) Get #f, , Player(Index).Char(3) Close #f End Sub DB Editor: Code: Sub LoadPlayer(ByVal Index As Long, ByVal Name As String) Dim FileName As String Dim f As Long FileName = App.Path & "\data\Accounts\" & Trim$(Name) f = FreeFile Open FileName For Binary As #f Get #f, , Player(Index).Login Get #f, , Player(Index).Password Get #f, , Player(Index).Char(1) Get #f, , Player(Index).Char(2) Get #f, , Player(Index).Char(3) Close #f End Sub Virtually the same, minus the file ending (which is sent with the name in the DB Editor) In both the loading is the same, except we get it more directly in the DB Editor when it assigns indexes. Any help would be great. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |