Mohenjo Daro Posted March 9, 2014 Author Share Posted March 9, 2014 O.K. I'm using Mirage Legacy, and don't criticize that, but I'm having a problem logging. The problem is that the game is telling me that the password is incorrect. I have a long user name and it touches the password in the .bin file. I'm thinking that the game is reading it weirdly but I haven't had an issue on other versions. If anyone has had and fixed this problem or has any USEFUL suggestions, then please share them. (Useful doesn't mean say switch engines) Link to comment Share on other sites More sharing options...
Growlith1223 Posted March 9, 2014 Share Posted March 9, 2014 does your username happen to have numbers in it? EO seems to have a thing where it doesn't read numbers correctly from dat files Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 9, 2014 Author Share Posted March 9, 2014 No, it's Mohenjo Daro. I have used an underscore instead of a space too, the error was still showing up. Link to comment Share on other sites More sharing options...
SkywardRiver Posted March 9, 2014 Share Posted March 9, 2014 Most likely you have the exact same password as another account on the server OR your name is too long for the account name string.Fixes:~Select a new password~Edit this line of code: ```Public Const ACCOUNT_LENGTH As Byte = 12``` to suit your needs Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 9, 2014 Author Share Posted March 9, 2014 Well, I did find the line of code, changed it, tried it, and it's still giving me the same error plus out or range 9 and overflow 6, any other ideas? Link to comment Share on other sites More sharing options...
SkywardRiver Posted March 9, 2014 Share Posted March 9, 2014 Hmmm. You'd need to delete the account you've made after you changed that constant if I'm correct.You'll also have to change that constant on the server side as well.Try that while I search for a fix Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 9, 2014 Author Share Posted March 9, 2014 O.K., I tried that too, still no luck. Link to comment Share on other sites More sharing options...
SkywardRiver Posted March 9, 2014 Share Posted March 9, 2014 Well snap. I'm sorry mate, it appears I can't help you here :/ Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 9, 2014 Author Share Posted March 9, 2014 Well thanks for trying. I know that if I use a shorter username and then my normal long name for the game name then it works, but I'd rather have both be my normal, guess I'll have to keep trying. Link to comment Share on other sites More sharing options...
Stein Posted March 10, 2014 Share Posted March 10, 2014 What sort of characters does your password contain exactly? VB6 does not take kindly to any non-standard letters and symbols can at times cause a few odd issues. (Also have you tried debugging to see what password the server receives? Maybe it's somehow sending skewed data or incomplete data) Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 10, 2014 Author Share Posted March 10, 2014 Ok, I am using normal letters and a space or underscore depending. I do not know how to see what it is saying I am sending and see what it wants me to send. I have looked into the .bin file and have seen that everything is there, but my username, password, and account name are all 12 letters long, if that many have something to do with it. Link to comment Share on other sites More sharing options...
Richy420Rich Posted March 11, 2014 Share Posted March 11, 2014 It's mainly to due to how the password is read in the server.You have to read the password as (ACCOUNT_LENGTH + 1)Because it grabs the character before the first letter of the password for some odd reason.Just replace the server code function; PasswordOk with this:```Function PasswordOK(ByVal Name As String, ByVal Password As String) As Boolean Dim filename As String Dim RightPassword As String * NAME_LENGTH Dim nFileNum As Long If AccountExist(Name) Then filename = App.Path & "\data\accounts\" & Trim$(Name) & ".bin" nFileNum = FreeFile Open filename For Binary As #nFileNum Get #nFileNum, ACCOUNT_LENGTH + 1, RightPassword Close #nFileNum End If If UCase$(Trim$(Password)) = UCase$(Trim$(RightPassword)) Then PasswordOK = True End IfEnd Function```This fix was by DaveMax. Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 11, 2014 Author Share Posted March 11, 2014 The reason, I think, is because the numbers start at 0, but how this code is suppose to fix this, I haven't a clue. I did replace the code with this but, sadly, it did not fix the problem. Link to comment Share on other sites More sharing options...
Richy420Rich Posted March 11, 2014 Share Posted March 11, 2014 The .dat file for the account allocates the memory values for NAME_LENGTH and ACCOUNT_LENGTH…Skywards fix would work but you'd have to delete all your accounts before it works correctly, because your existing .dats are already allocated.So since your account name reaches the max of 12, the code as is in EO 2.0 reads 1 character before the actual password.My .dat file is like this:> Richy TESTPASSWORDSo it has null characters before the password, which isn't be read by the code, because the Trim$() removes null characters before/after strings.Your .dat file is assumed to be like this:> Mohenjo DaroTESTPASSWORDTry logging in with the last character of your account name + password. oPASSWORDThe fix I posted above should have fixed this if this is your problem. Link to comment Share on other sites More sharing options...
Stein Posted March 11, 2014 Share Posted March 11, 2014 Oh? I thought this was fixed ages ago. Guess I was mistaken there. Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted March 11, 2014 Author Share Posted March 11, 2014 Stein, please read my whole problem, this is Mirage Legacy, it was an older custom engine. Anyways, you're right Richy, it is taking in the last letter and applying that to the password. I'll look into the code a bit more and see if I can see why the code you gave isn't working. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now