From e011432856047553d3e16721328a53b38f76973f Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Thu, 17 Apr 2025 18:16:09 +0200 Subject: [PATCH] Fix GM move function crashes --- P3D/Pokemon/Attacks/AttackSpecialFunctions.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb index 91ff520b4..69d7251c3 100644 --- a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb +++ b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb @@ -231,7 +231,9 @@ Dim FailMessage As String = "" If f.Split(CChar(",")).Count > 2 Then - Target = CBool(f.GetSplit(2, ",")) + If f.GetSplit(2, ",") <> "" Then + Target = CBool(f.GetSplit(2, ",")) + End If If f.Split(CChar(",")).Count > 3 Then Message = f.GetSplit(3, ",") If f.Split(CChar(",")).Count > 4 Then @@ -263,12 +265,14 @@ Dim FailMessage As String = "" If f.Split(CChar(",")).Count > 2 Then - Target = CBool(f.GetSplit(2, ",")) + If f.GetSplit(2, ",") <> "" Then + Target = CBool(f.GetSplit(2, ",")) + End If If f.Split(CChar(",")).Count > 3 Then Message = f.GetSplit(3, ",") If f.Split(CChar(",")).Count > 4 Then - If CInt(f.GetSplit(4, ",")) > 0 Then - If f.GetSplit(4, ",") <> "" Then + If f.GetSplit(4, ",") <> "" Then + If CInt(f.GetSplit(4, ",")) > 0 Then If CInt(f.GetSplit(4, ",")) > 0 Then LowerAmount = CInt(f.GetSplit(4, ",")) End If