Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Error run time 9 and crash server ????!!!!! help me =(


Rizz
 Share

Recommended Posts

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

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

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

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

> 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

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

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

  • 2 weeks later...
* 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

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: ok

The 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

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 InitServer

End Sub
```

If modGeneral isn't there, Project->Add Module->Existing->server/src/modGeneral.bas

If 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

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

* 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...