## C.46. `$world->gettriggernumber`

Abstract

$world->gettriggernumber function: GETs a TRIGGER's NUMBER

`@list = $world->gettriggernumber(` | `name` `)`;

Returns a list with the number(s) of the trigger(s) matching the given name. If no trigger with that name is found, returns an empty list. If there are several triggers with the same name, returns the numbers of all of them.

The number of a trigger is necessary to edit it. However, as the user can change the order of triggers, create new ones and delete old triggers, a trigger's number may change, so you should not store its number; you must fetch the number just before editing it.