From 84ff69a52defe254b932ee361f68be2fab7d369d Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 6 Aug 2024 15:28:12 +0200 Subject: [PATCH] fixing when no space --- .../torchlight3/Torchlight/Commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py index bb4f0be5..c2ddfb1c 100755 --- a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py +++ b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py @@ -718,9 +718,11 @@ class Say(BaseCommand): os.unlink(TempFile.name) return 1 #turning the string into a list where get_rubberband just picks the second element to search in - dline = ['', message.split(" ", 1)[1]] - rubberband = get_rubberBand(dline) - + try: + dline = ['', message.split(" ", 1)[1]] + rubberband = get_rubberBand(dline) + except Exception: + rubberband = None if AudioClip.Play(rubberband = rubberband): AudioClip.AudioPlayer.AddCallback("Stop", lambda: os.unlink(TempFile.name)) return 0