I figured out the problem. Instead of
trail1=ent_create("trail1mdl.mdl",my.pos,null);
use
trail1=ent_create("trail1mdl.mdl",nullvector,null);