ID:138775
 
Code:
obj
Click()
if(icon_state == "grey") return null
del(usr.marker)
usr.marker = image('outline.dmi',src)
usr << usr.marker
usr.in_hand = src
for(var/turf/summon/U in view())
if(U.icon_state == "waiting") U.icon_state = "unused"
for(var/mob/M in view())
del(M.pointer)

Gems
icon = 'GemCards.dmi'
Click()
..()
var action = input("What do you want to do?") in list("Activate","Destroy")
if(action == "Activate")
usr.gems[src.element]++
else if(action == "Destroy")
usr.power[src.element] += 3
usr.client.screen -= src
UpdatePowers(usr,1)

Problem description:

I am quite sure the main Click() procedure works as intended.
When I click on a Gem obj, though, I get a "runtime error: cannot read from list)
The funny part is that in spite of the error message the code is executed smoothly, and I really have no idea which list it is unable to read from.
No one?
Turn on debug mode (Build -> Preferences) and try it again. It should point you to an exact line that the error is occurring on.
In response to Audeuro
Uhm, yes, I see what happens, the problem is in an intermediate Click procedure I thought wasn't called.
Thanks for the help