Weird compile error with using DateTime for an IComparer

import System;

class UnlockEvent {
	var year : int;
	var month : int;
	var day : int;
	var hour : int;
	var minute : int;
	
	function UnlockEvent () {
		var now = DateTime.Now;
		year = now.Year;
		month = now.Month;
		day = now.Day;
		hour = now.Hour;
		minute = 0;
	}
}

class UnlockEventComparer extends IComparer {
	function Compare(a : Object, b : Object) {
		var uea : UnlockEvent = a;
		var ueb : UnlockEvent = b;
		var dta : DateTime = new DateTime(uea.year, uea.month, uea.day, uea.hour. uea.minute, 0);
		var dtb : DateTime = new DateTime(ueb.year, ueb.month, ueb.day, ueb.hour. ueb.minute, 0);
		return dta.Compare(dtb);
	}	
}

Results in these errors:
Assets/Test.js(24) error BCE0019: ‘uea’ is not a member of ‘int’.
Assets/Test.js(25) error BCE0019: ‘ueb’ is not a member of ‘int’.

Those are the DateTime constructor lines.

This is the DateTime constructor I’m using:

http://www.go-mono.com/docs/index.aspx?link=C%3ASystem.DateTime(System.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32)

(Forum won’t handle this link)

What’s going on? I guess I’ll just not use DateTime in this context for now and do the comparison myself.

Thanks,
-Jon

That should be a , not a .

So the compile error is actually quite good.

Yarrrrrrrgh. :slight_smile:

Thanks. I wish it gave a column number. Then I wouldn’t have missed it.