ok so im trying to make a game i made multiplayer using winsocks, i have a couple of problems firstly for some reason my game is crashing when you start and i have no idea why. it seems to be jumping to the multiplayer form and trying to send stuff before it connects to the server to start the game even though i have it set to start with the menu form. second i want to know if im doing something wrong with the way i use them (im new at working with networks). The game is the attached file.
When trying to load the game I get the following errors:
Code:
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Also, File not found for
Open App.Path & "\achievements.txt" For Input As Filenumber
One of your problems is that in Form frmWait you are referencing frmMultiPlayer which causes that form to be loaded and hence the Form_Load event will trigger. You could resolve that by moving the code from the Form_Load event into the Form_Activate event.
There are also some typos in the Server routine, you have 2 winsocks on the form, sock and sock2 but you are referencing sock1 in the code. I recommend you put 'Option Explicit' in the Declarations Section of all your Forms so that any undefined variables are reported to you when you compile.
I am also getting load errors when accessing some of the forms in the project.
When trying to load the game I get the following errors:
Code:
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Line 12: Property Picture in frmMultiPlayer had an invalid file reference.
Line 46: Property Picture in imgUnlocked had an invalid file reference.
Line 141: Property Picture in imgP2right had an invalid file reference.
Line 150: Property Picture in imgP2left had an invalid file reference.
Line 159: Property Picture in imgP2up had an invalid file reference.
Line 168: Property Picture in imgP2down had an invalid file reference.
Line 217: Property Picture in imgMainRight had an invalid file reference.
Line 226: Property Picture in imgmainup had an invalid file reference.
Line 235: Property Picture in imgMainleft had an invalid file reference.
Line 244: Property Picture in imgMain had an invalid file reference.
Line 253: Property Picture in imgRobot had an invalid file reference.
Line 261: Property Picture in imgRobot had an invalid file reference.
Line 269: Property Picture in imgRobot had an invalid file reference.
Line 277: Property Picture in imgRobot had an invalid file reference.
Line 285: Property Picture in imgRobot had an invalid file reference.
Line 293: Property Picture in imgRobot had an invalid file reference.
Line 301: Property Picture in imgRobot had an invalid file reference.
Line 309: Property Picture in imgRobot had an invalid file reference.
Line 317: Property Picture in imgRobot had an invalid file reference.
Line 325: Property Picture in imgRobot had an invalid file reference.
Line 411: Property Picture in imghealthpack had an invalid file reference.
Also, File not found for
Open App.Path & "\achievements.txt" For Input As Filenumber
my bad i forgot to put all the pictures and text files in the compressed folder but thats not what the problem is, theyre all fine on my computer. thanks for the help guys but im still at a loss as to why it loads frmwait first
The very first (and only) thing you do in frmMenu's Load event is 'frmWait.Show'
oh wow now i feel like an idiot, i cant believe i missed that. thanks guys for the help and everything's good code wise for multiplayer right? like the only problems now should be other things like firewalls and whatnot correct?