I'm just trying to trigger an function with an action assigned to the entity that gets hit by the player. and add +10 to the score this is what i have come up with on help doc and it still not working in any scene of the word.

function hit_star()
{

if (event_type == EVENT_ENTITY) // the Player has collided with one of the entities in the level?
{
ptr_remove(me); // disappear when hit
score += 10;
}
}

action pick_up_star()
{
my.emask |= ENABLE_ENTITY; // make entity sensitive for entity collision
my.event = hit_star();

}