From 3291195af89dc278c4300e728d3660bcd34fe03c Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Fri, 22 Jul 2011 16:15:34 -0600 Subject: [PATCH] Fixed regions not working. --- TShockAPI/DB/RegionManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TShockAPI/DB/RegionManager.cs b/TShockAPI/DB/RegionManager.cs index 655cff77..e4ba7b1a 100644 --- a/TShockAPI/DB/RegionManager.cs +++ b/TShockAPI/DB/RegionManager.cs @@ -234,6 +234,10 @@ namespace TShockAPI.DB { for (int i = 0; i < SplitIDs.Length; i++) { + if (SplitIDs.Length == 0) + { + break; + } r.RegionAllowedIDs[i] = Convert.ToInt32(SplitIDs[i]); } } catch (Exception e) @@ -241,7 +245,7 @@ namespace TShockAPI.DB Log.Error("Your database contains invalid UserIDs (they should be ints)."); Log.Error("A lot of things will fail because of this. You must manually delete and re-create the allowed field."); Log.Error(e.Message); - continue; + Log.Error(e.StackTrace); } Regions.Add(r);