1st - You do not use the "jass"-bracers to make your code easily readable for others. <jass></jass>
2nd - Your code uses functions, which are not defined in "common.j" or "blizzard.j". (GetHandleUnit(), GetHandleLocation(), etc.) And that is the point, why your code does not work.
local unit u = GetHandleUnit(t,"u")
The VM thinks, "GetHandleUnit(t,"u")" is the name of a variable but as there is no variable with this name... You have to write these handle-functions into the head of your script. They can be found somewhere in this forum but I am too busy (== lazy ^^) to seek them.
Seek them by yourself or ask UnMi.
3rd - You use a trigger condition. Replace it by writing your "Actions"-code into an additional if-structure with the return value of the "Conditions"-function.