Skip to content

Commit

Permalink
Visible error message prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
MinecraftZuriki committed Nov 30, 2017
1 parent 091ff8b commit 6f2e9f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/launcher.py
Expand Up @@ -231,7 +231,7 @@ def infoDialog(message):
#end def

if(len(sys.argv)>1):
print(sys.argv[1])
app = QtWidgets.QApplication([sys.argv[0]])
else:
app = QtWidgets.QApplication(sys.argv)
window = MainWindow()
Expand All @@ -243,19 +243,19 @@ def infoDialog(message):
parameters = None

if(protocolString==""):
print("Unexpected protocol format, malformed or wrong version")
errorDialog("Unexpected protocol format, malformed or wrong version")
sys.exit()
else:
parameters = protocolString.split("/")
if(len(parameters)!=4):
print("Wrong number of parameters in protocol data, malformed or wrong version")
errorDialog("Wrong number of parameters in protocol data, malformed or wrong version")
sys.exit()
#end if

mpticketFile = None
instancePath = os.path.abspath(os.path.join(Config.multiMcPath(), "instances", parameters[2]))
if(os.path.exists(instancePath)==False):
print("You do not have this version of Minecraft installed")
infoDialog("You do not have this version of Minecraft installed: " + parameters[2])
sys.exit()
else:
launchMinecraft(parameters[0], parameters[1], parameters[2], parameters[3])
Expand Down

0 comments on commit 6f2e9f1

Please sign in to comment.