Mirage Source http://miragesource.net/forums/ |
|
3.0.7 help http://miragesource.net/forums/viewtopic.php?f=195&t=3020 |
Page 1 of 1 |
Author: | Beres [ Sun Nov 11, 2007 11:12 pm ] |
Post subject: | 3.0.7 help |
Ok, i got the database working but when I go to make an character, when I click create, it gives my server an error and highlights If .FKey = 0 Then .FKey = RS!FKey End If Whats wrong? |
Author: | William [ Mon Nov 12, 2007 12:48 am ] |
Post subject: | Re: 3.0.7 help |
What error number do you get, and what does it say? |
Author: | Beres [ Mon Nov 12, 2007 5:30 am ] |
Post subject: | Re: 3.0.7 help |
Ok, everything works fine. I log into my account, click create new character, enter a character name and choose my class, then when I click on create it gives me: Compile Error: Invalid or unqualified reference And it highlights the .FKey in the If .FKey = 0 Then Code: Sub AddChar(ByVal Index As Long, ByVal Name As String, ByVal Sex As Byte, ByVal ClassNum As Byte, ByVal CharNum As Long)
Dim RS As ADODB.Recordset Set RS = New ADODB.Recordset Dim I As Long RS.Open "SELECT * FROM characters;", Conn_Client, adOpenStatic, adLockOptimistic RS.AddNew RS!Account = Player(Index).FKey RS!Name = Trim$(Name) RS!Sex = Sex RS!Class = ClassNum RS!Sprite = Class(ClassNum).Sprite RS!Level = 1 RS!str = Class(ClassNum).str RS!DEF = Class(ClassNum).DEF RS!SPEED = Class(ClassNum).SPEED RS!MAGI = Class(ClassNum).MAGI RS!Map = 1 RS!X = 1 RS!Y = 1 RS!HP = 10 RS!MP = 10 RS!SP = 10 RS.Update If .FKey = 0 Then .FKey = RS!FKey End If RS.Close Set RS = Nothing End Sub |
Author: | Dragoons Master [ Mon Nov 12, 2007 6:34 am ] |
Post subject: | Re: 3.0.7 help |
Replace: If .FKey = 0 Then .FKey = RS!FKey End If with: If Player(Index).FKey = 0 Then Player(Index).FKey = RS!FKey End If |
Author: | Rian [ Mon Nov 12, 2007 6:35 am ] |
Post subject: | Re: 3.0.7 help |
Hmm. I really don't understand much of the SQL related stuff in VB, but it looks like it should be in some sort of With |
Author: | Beres [ Mon Nov 12, 2007 7:23 am ] |
Post subject: | Re: 3.0.7 help |
Dragoons Master wrote: Replace: If .FKey = 0 Then .FKey = RS!FKey End If with: If Player(Index).FKey = 0 Then Player(Index).FKey = RS!FKey End If I did do that and it totally froze up my server.. |
Author: | Dragoons Master [ Mon Nov 12, 2007 12:58 pm ] |
Post subject: | Re: 3.0.7 help |
Well, it fixed your error, but now you have a new one. Before you click on create account, go to the server and stop it then press F8, and then click on create account. You'll see that the server is running line by line, so you can press F8 a few times and make sure where the bug is, I mean the line... |
Author: | Beres [ Mon Nov 12, 2007 4:32 pm ] |
Post subject: | Re: 3.0.7 help |
Ok I would try this, but now it keeps saying "Access Denied" when I click on create char |
Author: | Dragoons Master [ Mon Nov 12, 2007 4:36 pm ] |
Post subject: | Re: 3.0.7 help |
You need to be an administrator to run a server... I think that's the problem. You realy need to xD Edit: Btw, is this a system msg or an error or what? |
Author: | Beres [ Mon Nov 12, 2007 4:45 pm ] |
Post subject: | Re: 3.0.7 help |
Like it worked when I made a new account, its a msgbox error |
Author: | Dragoons Master [ Mon Nov 12, 2007 5:23 pm ] |
Post subject: | Re: 3.0.7 help |
There is no msg like "Access Denied" in vanila MSE... I don't know... I don't think this is a msgbox from MSE, it probably is a problem w/ your access level... |
Author: | Beres [ Mon Nov 12, 2007 8:33 pm ] |
Post subject: | Re: 3.0.7 help |
Well I dont know.. I downloaded 3.0.7 bcuz I would really love to use a database. I used that 3.0.7 installation guide which is stickied and then used his dump file which set up my database. Now, everything runs fine except creating a new character. I put in the Sub AddChar from the installation guide and it doesnt work. |
Author: | Dragoons Master [ Mon Nov 12, 2007 8:42 pm ] |
Post subject: | Re: 3.0.7 help |
Take a look at MySql user information, now that you said this, I think it is your MySql user that does not have the permissions to create a new record. Take a look at that! |
Author: | William [ Mon Nov 12, 2007 9:37 pm ] |
Post subject: | Re: 3.0.7 help |
Quote: I recommened using my sql dump. This will give you 5 maps, 5 shops, 5 items, 5 npcs, and 5 spells. Set your MAX_ variables to equal these (both client and server) and test out your 3.0.7 server. Did you sett all MAX_ to 5? |
Author: | Cruzn [ Mon Nov 12, 2007 9:49 pm ] |
Post subject: | Re: 3.0.7 help |
Sorry, this is the sub that should've been posted (my bad) with my guide: Code: Sub AddChar(ByVal Index As Long, ByVal Name As String, ByVal Sex As Byte, ByVal ClassNum As Byte, ByVal CharNum As Long) Give that a try.Dim RS As ADODB.Recordset Set RS = New ADODB.Recordset RS.Open "SELECT * FROM characters;", Conn_Client, adOpenStatic, adLockOptimistic RS.AddNew RS!Account = Player(Index).FKey RS!Name = Trim(Name) RS!Sex = Sex RS!Class = ClassNum RS!Sprite = Class(ClassNum).Sprite RS!Level = 1 RS!str = Class(ClassNum).str RS!DEF = Class(ClassNum).DEF RS!SPEED = Class(ClassNum).SPEED RS!MAGI = Class(ClassNum).MAGI RS!Map = 1 RS!X = 1 RS!Y = 1 RS!HP = 10 RS!MP = 10 RS!SP = 10 RS.Update If Player(Index).Char(CharNum).FKey = 0 Then Player(Index).Char(CharNum).FKey = RS!FKey End If RS.Close Set RS = Nothing End Sub If that still doesn't work, you can just use my download link: http://www.talkanime.net/3.0.7/MS3.0.7v2.rar MS 3.0.7 which has all of the fixes/changes mentioned in my guide implemented. William wrote: Quote: I recommened using my sql dump. This will give you 5 maps, 5 shops, 5 items, 5 npcs, and 5 spells. Set your MAX_ variables to equal these (both client and server) and test out your 3.0.7 server. Did you sett all MAX_ to 5? |
Author: | Beres [ Mon Nov 12, 2007 10:11 pm ] |
Post subject: | Re: 3.0.7 help |
Ok cruzn, thx. I downloaded that one from your link and well, I set up the db and it worked. But now when I click on create character, it says connected and all that but the server totally freezes.. |
Author: | El_Dindonnier [ Wed Nov 14, 2007 6:49 pm ] |
Post subject: | Re: 3.0.7 help |
Beres wrote: Ok cruzn, thx. I downloaded that one from your link and well, I set up the db and it worked. But now when I click on create character, it says connected and all that but the server totally freezes.. I have the same problem, can I help me please ? (thanks you in advance) El_Dindonnier. |
Author: | Beres [ Wed Nov 14, 2007 7:01 pm ] |
Post subject: | Re: 3.0.7 help |
I actually got this working now.. What I did was just download the old 3.0.7, and did the installation guide.. EXCEPT, I didnt put in the AddChar sub. I left it as it was and well it connects and everything runs fine. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |