You assigned a material instead of an action on the ent_create's last parameter, that's why it crashed I think.