would you mind send me the test map where the code doesn't compile?
edit
here's the main and my test triggers :
IsDestTree
Events
Map initialization
Conditions
Actions
Set DestChecker = No unit
Custom script: set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
Unit - Hide DestChecker
Custom script: endfunction
Custom script: function IsDestTree takes destructable d returns boolean
Custom script: return IssueTargetOrderById(udg_DestChecker,852018,d) and IssueImmediateOrderById(udg_DestChecker,851972)
Custom script: endfunction
Custom script: function DestroyTree takes destructable d returns nothing
Custom script: if IsDestTree(d) and GetWidgetLife(d) > 0.405 then
Custom script: call KillDestructable(d)
Custom script: endif
Example
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Set Dest = Barrel 0000 <gen>
Custom script: if IsDestTree(udg_Dest) then
Game - Display to (All players) the text: It's a Tree!
Custom script: call DestroyTree(udg_Dest)
Custom script: else
Game - Display to (All players) the text: What's that?
Custom script: endif
hope that helps!
also, changes my font