When I launch a .EXE from my program, it errors..(see attachment)
and here is the code that executes the .exe:
Code:
Private Sub cmd_hostRS_Click()
If host = True Then
If frm_host.lbl_rsStatus.Caption = "The host has launched the game." Then
txt_log = txt_log & "You can not host a game, someone is already hosting!" & vbNewLine
Exit Sub
End If
Else
If frm_client.lbl_rsStatus.Caption = "The host has launched the game." Then
txt_log = txt_log & "You can not host a game, someone is already hosting!" & vbNewLine
Exit Sub
End If
End If
For i = 0 To 15
If frm_log.check_status(i).Value = 0 And frm_log.txt_username(i).Text <> "" Then
GoTo notrdy
End If
Next
GoTo rdy
notrdy:
txt_log = txt_log & "You can not host a game, someone has not checked their ready button." & vbNewLine
Exit Sub
rdy:
Randomize
Retry:
portnum = Int((6000 * Rnd) + 1)
If portnum < 3001 Then GoTo Retry
HostLaunched = True
RsP = portnum
Debug.Print RsP
SaveString HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "FootstepSoundVolume", "100.000000"
SaveString HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "FullScreen", "FALSE"
SaveString HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "MultiplayerAnnounceGames", "FALSE"
SaveString HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "MultiplayerMessageName", "FXL Server: " & Mid(RsP, 2, 2) & " FXL"
Ret = GetString(HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "MultiplayerPlayerName")
SaveString HKEY_LOCAL_MACHINE, "SOFTWARE\Red Storm Entertainment\Rogue Spear", "MultiplayerPlayerName", Mid(RsP, 2, 2) & " " & alias
Shell ChosenRsPath & "ROGUESPEAR.EXE" & " -server " & RsP, vbNormalFocus
Launched = True
frm_log.Visible = False
If host = True Then
frm_host.Visible = False
Else
frm_client.Visible = False
End If
StartInSysTray
End Sub
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.