From 65645bfcbeb413153c6a7c2bb54c6841662598bf Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 26 Mar 2022 17:23:04 +0100 Subject: [PATCH] try to catch the access_violation bug --- .../GriffonStudios_Warcraft_3_Reforged_Parser.ms | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Warcraft_3_Reforged_Tools/GriffonStudios_Warcraft_3_Reforged_Parser.ms b/Warcraft_3_Reforged_Tools/GriffonStudios_Warcraft_3_Reforged_Parser.ms index ed90a37..763cc78 100644 --- a/Warcraft_3_Reforged_Tools/GriffonStudios_Warcraft_3_Reforged_Parser.ms +++ b/Warcraft_3_Reforged_Tools/GriffonStudios_Warcraft_3_Reforged_Parser.ms @@ -229,23 +229,24 @@ struct Warcraft_3_Ref_Parser ), function GetAllAnimatedKeyFrames= ( + clearSelection() local uniqueKeys = #() for obj in objects do ( + try ( for i=1 to obj.numSubs do ( if obj[i].Keys != undefined then ( - for j=1 to obj[i].numsubs do ( if obj[i][j].Keys != undefined then ( for k in obj[i][j].keys do ( - local strTime = k.time as string - local iTime = substring strTime 1 (strTime.count - 1 ) as integer - + + local iTime = k.time as integer / TicksPerFrame + appendifunique uniqueKeys iTime ) @@ -254,6 +255,7 @@ struct Warcraft_3_Ref_Parser ) ) + ) catch() ) local sortedKeys = sort uniqueKeys