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

  • 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.)

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?

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.

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?

  • 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.

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 …

A RTE 9 is not caused randomly. There’s always a cause. It’s easy to fix once you know the value that’s out of range. In order to figure that out, you need to have the error come up while running the server in the IDE. Hover over each value in the line it shows you, and find the one that’s causing the error.

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 …

I’m not sure what you’re saying here, but don’t copy the files, especially the source files, from the client to the server, or the other way around. The client and server work differently for a reason.

As for the issue the “Need startup form or sub main”, your program doesn’t know where to begin the sub of code. Go into the properties of your program and select Sub Main. Now look for the sub itself. If you can’t find it, then that explains why your form isn’t showing up. Do exactly as Zeno said and put this sub in modGeneral.


public sub Main()

call initServer

end sub

As for the issue the “Need startup form or sub main”, your program doesn’t know where to begin the sub of code. Go into the properties of your program and select Sub Main. Now look for the sub itself. If you can’t find it, then that explains why your form isn’t showing up. Do exactly as Zeno said and put this sub in modGeneral.


public sub Main()

call initServer

end sub

If that sub is missing, IMO it’s far more likely that the entire module is missing. Pasting will probably just bring us to an error with the next missing sub in modGeneral. :mellow: Rizz, does modGeneral exist in your project? It should be on the right-hand column with the other modules.

You mentioned copying the maps files from server to client. This is completely unrelated to your problem. Don’t bother. In the future, keep in mind that although this could be helpful if the client had corrupted map files, it is best to just empty the client map folder.

To re-iterate: the single only solution to the specific problem you’re having now is with whether modGeneral.bas is included in your project, and whether Sub Main() exists in that module. It has nothing to do with RTE9 or your client files (you said it’s a server-side error).

You may want to try learning the basics of VB6 if you’re serious about this.

Nothing, it seems it is my VB6 who has trouble …

I thank everyone for the advice and the links to the guides, but apparently this project should not go into port ç_ç

In addition to my inability 'to use vb6 not even know where to find a program (vb6) that is not working either for a fee = (

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 …

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 …

In order to fix this, you’d have to have a decent copy of VB6. You can’t progress without it. Your last option is asking someone to fix it for you, but it might be hard finding someone to do it for free.

I know I guess …

Another option would be to completely fill the list of map npc, so as to leave more space …

But we are talking about 100 npc map (I use maps to 50x50) …

If someone could help me, I’m staying still waiting, thank you the same for all the help 😃

Found something for the modGeneral error!

Idk if it has been said but:

When you open the project, open up modGeneral file in it, at upper right of the appearing screen there’s a declarations table. Change it to MAIN.

I hope it helped.

Log in to reply