summaryrefslogtreecommitdiff
path: root/game/script.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/script.rpy')
-rw-r--r--game/script.rpy11
1 files changed, 7 insertions, 4 deletions
diff --git a/game/script.rpy b/game/script.rpy
index f5fc1af..7769112 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -50,15 +50,18 @@ init python:
return
def onopen(self):
- global tr_busy, tr_load, tr_val
- print("Opening connection")
+ global tr_busy, tr_load, tr_val, HOST
+ print("Opening connection to %s" % HOST)
tr_load=True
tr_val=""
tr_busy=False
self.send("Ping")
def onerror(self, err):
- print("ERROR RECEIVED")
+ stdout("ERROR RECEIVED")
+ stdout("More details: %s" % repr(err))
+ stdout("An error happened: %s" % str(err))
+ renpy.full_restart()
raise err
# Inform you are now ingame
@@ -96,7 +99,7 @@ label start:
# on_open=None, on_message=None, on_error=None,
# on_close=None, on_ping=None, on_pong=None,
# on_data=None):
- ws = wsock.WebSocketApp("wss://localhost:61000",
+ ws = wsock.WebSocketApp("wss://"+HOST+":61000",
on_data=ondata, on_error=onerror, on_open=onopen,
on_message=onmsg)
print repr(ws)