okay, so i copied and pasted the entire section of the post i found relative to the UDF. Now, when i run it, i get this error:

ERROR : array reference out of bounds!
Script: \\servername\NETLOGON\admin.kix
Line : 246

Line 246 is:

IF $events_1030[0] <> ""

any ideas?