[BUG] Sys.cs Conditions buggin out on undefined Variable

Jan 17, 2013 at 8:39 AM

Trigger.ReadVariable was returning a null Value when the variable is undefined.. I corrected this by adding a Variable var = new Variable; that presets defaults.

IsvariableEqualToNumberorVariable and IsvariableNotEqualToNumberorVariable Bugged out with NullReferenceException. changed them to

	if (var.Value is double)
	{
	    return var.Value == optVar.Value;
	}
	return 0 == Convert.ToDouble(optVar.Value);

AND

	if (var.Value is double)
	{
	    return var.Value == optVar.Value;
	}
	return 0 != Convert.ToDouble(optVar.Value);