Thank you for your reply.
What that tells us is the line of code causing the errors is past line 138 and before line 145, where the next print is:
Print("136");
ZOrder = ChartBars.ZOrder - 7;
Print("138");
if(!initOne)
{
menuSepa = new Separator();
menuItem = new MenuItem { Header = "Zones" };
menuItemActive = new MenuItem { Header = (hideActiveZones) ? "Show Active Zones" : "Hide Active Zones" };
menuItemBroken = new MenuItem { Header = (hideBrokenZones) ? "Show Broken Zones" : "Hide Broken Zones" };
Print("145");
menuItemActive.Click += toggleActiveZones;
menuItemBroken.Click += toggleBrokenZones;
Print("148");
menuItem.Items.Add(menuItemActive);
menuItem.Items.Add(menuItemBroken);
Print("151");
initOne = true;
}
This should help you to narrow down which line of code and/or which variable is causing the error so you may further debug the script.
Please let me know if I may be of further assistance.

Comment