Rizz Posted May 15, 2013 Author Share Posted May 15, 2013 Hello to all ..I am creating an online game on pokemon, following those for normal platforms of video games …I've pretty much done it all, but when I play online with a friend of mine, I get a run time error 9, and it makes me crash the server ...This error I get is not in the evocation of the pokemon but, during the fighting and during the recall of pokemon, although not always ...My pokemon are nothing more than the pet, in fact I use the command summon to call them ...How can I solve this problem?EDIT :I tried to play my game again with my friend ...The server crash happens only when a player uses the command (button) to recall the pet (disband) ...However, the crash does not always happen, I tried to call the pet to my friend, the first time everything goes smoothly but the second there is the crash ...However, if the players are located in 2 different maps, there is no crash ...I also noticed that when my pet recall, in the data of maooa (more 'precisely in the box in which, you set the npc visible on the map), the recalled pet looks like wandering npc not connected to my character ...I think the server crash is because you call a pet, pet but that 'is read by the program as NPCs wandering the map and then there is a conflict and then the server crashes ... Link to comment Share on other sites More sharing options...
Synergy Posted May 15, 2013 Share Posted May 15, 2013 Run the code through the debugging in the IDE.When it highlights a line, hover your mouse of it and see what it says. Link to comment Share on other sites More sharing options...
Zeno Posted May 15, 2013 Share Posted May 15, 2013 Runtime error 9 happens when a subscript is out of range, which means a numerical value is either too high or too low for the range, or that the data types don't match up. Because it's such a vague (and extremely common) error, we will need more information to help you.Since the server is crashing, I suspect a server-side error. Run both your client and server in VB6 by loading their sources and pressing ctrl+f5\. When the error happens, it should highlight a line of code. Please post the entire sub of that error here. Link to comment Share on other sites More sharing options...
abhi2011 Posted May 16, 2013 Share Posted May 16, 2013 Also specify the line of code that is highlighted. Hover over each variable in that line of code, and tell us which variable is out of range. Link to comment Share on other sites More sharing options...
Rizz Posted May 16, 2013 Author Share Posted May 16, 2013 Unfortunately I do not have VB6, I can not find the download = (…So I do not know how to do it = ( Link to comment Share on other sites More sharing options...
abhi2011 Posted May 16, 2013 Share Posted May 16, 2013 > Unfortunately I do not have VB6, I can not find the download = (…> > So I do not know how to do it = (Google a torrent. We can't help you without it. Link to comment Share on other sites More sharing options...
Rizz Posted May 16, 2013 Author Share Posted May 16, 2013 Ok, I installed VB6, now what should I do?If it bothers you, you could explain everything step by step please? Link to comment Share on other sites More sharing options...
abhi2011 Posted May 16, 2013 Share Posted May 16, 2013 Follow these steps* Open up the Server.vbp* Press Ctrl+F5, to fully compile and run the server.* When the error occurs the a box will appear.* There will be a debug button. Click on it* A line will be highlighted.* Paste that line over here.* Now in the line that is highlighted hover over each word. A tool tip will appear if the current word being hovered over is variable.* The tooltip will have the value. The variable/word that is out of range will have a value of '' (The right hand side of the tooltip)* Paste that variable/word here. Link to comment Share on other sites More sharing options...
Rizz Posted May 16, 2013 Author Share Posted May 16, 2013 When I open the server of my game (vb6 open, open project, I try and select my server, and I'm open) …Without this I get an error: Must have startup form or Sub Main ()I click OK and I get a window of data compilation (I guess it's one of the server) ...I click OK again and nothing happens ...What should I do? Link to comment Share on other sites More sharing options...
Zeno Posted May 16, 2013 Share Posted May 16, 2013 That's really odd. I'm not sure you've opened the correct file. It should be the only vb6 file in the client/server folder. Do not go into the source folders. Link to comment Share on other sites More sharing options...
abhi2011 Posted May 17, 2013 Share Posted May 17, 2013 > When I open the server of my game (vb6 open, open project, I try and select my server, and I'm open) …> > Without this I get an error: Must have startup form or Sub Main ()> > I click OK and I get a window of data compilation (I guess it's one of the server) ...> > I click OK again and nothing happens ...> > What should I do?Open up the Server.VBP Link to comment Share on other sites More sharing options...
Rizz Posted May 17, 2013 Author Share Posted May 17, 2013 I opened the server.vbpToday, trying again, the error is no longer 'out, bo XDThe server I have to keep running, or just apritlo with vb6? Link to comment Share on other sites More sharing options...
abhi2011 Posted May 17, 2013 Share Posted May 17, 2013 Okay then. Since it seems to have solved itself, compile and run it.Search for how to compile.Edit main post and set tag to resolved. Link to comment Share on other sites More sharing options...
Rizz Posted May 17, 2013 Author Share Posted May 17, 2013 the error that seems to have solved is to ctrl + f5 in vb6 XD (but is back again if I press ctrl + f5) …Now, I have opened the file server.vbp (and I currently have the server on) now what do I do to find the error that I get in the game? Link to comment Share on other sites More sharing options...
The Imp Posted May 17, 2013 Share Posted May 17, 2013 Upload the file on megaupload or something, and send me a link. I'll take a look at it and fix it. No one can really help you too much unless they see it for themselves. Link to comment Share on other sites More sharing options...
Rizz Posted May 17, 2013 Author Share Posted May 17, 2013 I'll send you the download link of the folder with all files on the server via private message… Link to comment Share on other sites More sharing options...
The Imp Posted May 17, 2013 Share Posted May 17, 2013 Alright, I'll attach a document that will have a guide to what I did, so maybe you could change the original and learn how to use the basics of VB6 (which will be useful for enhancing your game further in the future). Link to comment Share on other sites More sharing options...
abhi2011 Posted May 18, 2013 Share Posted May 18, 2013 Did you play with a friend of yours as you stated? VB6 won't throw the error for you. The error will have to be caused by something. Link to comment Share on other sites More sharing options...
Rizz Posted May 26, 2013 Author Share Posted May 26, 2013 The Imp, still nothing? Link to comment Share on other sites More sharing options...
Rizz Posted May 28, 2013 Author Share Posted May 28, 2013 Ok, I still alone …I open vb6 then what should I do?could you explain it step by step (the beginner) Link to comment Share on other sites More sharing options...
abhi2011 Posted May 29, 2013 Share Posted May 29, 2013 * Open up Server.vbp in the Server Folder* Press Ctrl+F5 in VB6* The server will open up* Do what was done to cause the Subscript out of range.* A box showing the error will be shown* There will be a debug button in the box. Click it* The box will disappear and a line will be highlighted in yellow.* Paste that line over here.* In that line hover over each variable.* In one of the variables the value will Subscript out of range.* Tell us which variable that is. (Sometimes there will be multiple variables with subscript out of range due. If so then tell us all those variables.) Link to comment Share on other sites More sharing options...
Rizz Posted May 29, 2013 Author Share Posted May 29, 2013 Ok, I open the file: server.vbp in vb6 but when I click: ctrl + f5 tells me this:Must have startup form or Sub Main ()Now, if I press on: okThe program opens the parameter window of the server (or at least I think) …At this point I insert all the data and I press on again: ok ...but 'my server does not start, I do? Link to comment Share on other sites More sharing options...
Zeno Posted May 29, 2013 Share Posted May 29, 2013 Sounds like you're missing pieces. Is modGeneral included in the modules listed on the right-hand side of the IDE? That's where Sub Main() is. If it is, do a quick search for "Sub Main()" and check that you have this:```Public Sub Main() Call InitServerEnd Sub```If modGeneral isn't there, Project->Add Module->Existing->server/src/modGeneral.basIf many modules are missing, just make a new project file and add in the entire contents of the src folder. Link to comment Share on other sites More sharing options...
Rizz Posted May 29, 2013 Author Share Posted May 29, 2013 I did not understand what I do, not that I need to install something called: MSDN?EDIT :Reading various issues here in the forum I found out that run time error 9 is just a bug "annoyance", appears randomly and no one knows the cause, but just restart the server or the client a couple of times and the problem is solved …This error, however, 'may, however, be affected by the same ...In another matter however, a member of the forum said that to solve the problem simply copy the folder and paste it mapps server instead of the client ...Do you see things that are true? Link to comment Share on other sites More sharing options...
abhi2011 Posted May 29, 2013 Share Posted May 29, 2013 * Open up server.vbp* In the Project Explorer under the modules section find modGeneral* Make sure that a sub called Main is there. If the Main sub isn't there paste this code inside the module.``` Public Sub Main() Call InitServer End Sub ```* If you cannot find modGeneral then remove the engine and download it again. 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