Hard coding link numbers into scripts is usually bad practice. So it's often best to search for something more concrete like the name of a linked prim and assign it to an integer using a loop by using llGetLinkName and comparing it to the link name you want to find. This isn't very friendly to new scripters who want to work with linked prims.
A function that checks all of the prims in a linkset and finds the first instance of a specified link name would make scripts like this much easier.
If I wanted to find the first instance of 'door left' in a linkset this could look like; llFindLinkNumber("door left");