You use the u variable when it's null.
local unit u
local PlayerData pd = PlayerData(GetHandleInt(GetOwningPlayer(-->u<--),"pd"))
That runs before your debug message so that's why you never see it.
Oh and btw, you say it should damage every 0.1 seconds but the trigger seems to be running every 0.05 :).