Yesterday I had something happen that caused a visitor to my store and myself some grief. I have a "billboard" in my store that show pictures of various sites and hands out a landmark to that site. I had intended to sell this item at one time, so I built in an info box tacked to it that would give out a notcard about how someone can add their own "ad" to it. Of course I used a simple notecard giving script. Someone visited my store and clicked the infobox and got a notecard. Not unexpected. For some reason it started spamming him with notecards. I started getting messages about "the user is in busy mode, your message will be displayed etc...". Not sure why I was getting the busy mode message. I jumped in world and reset the script and it stopped.
What I am believed caused the problem is that in my touch event I use a for loop. I do this mostly out of habit from normal programming practices. Since I have a known number if interations and want to respond to all the avatars who touch the item it seemed like a good idea. Most the time when I see scripts posted by various people they will use the index of zero when using fuctions like llDetectedKey() in conjunction with the touch event.
So I ask my fellow scriptors what I the better practice? I would expect it would depend on the application. I would also expect that there would be an issue of creating "lag" when using a loop with touch events or any that can potentially have multiple avatars interacting with the object.