ID:155203
 
obj/Room
var
room_name
room_master
roompassword
roomtopic
roomtype

New(var/Nname,var/Npass,var/Nstatus,var/Ntopic,var/Nmaster)
src.name=Nname
src.roompassword=Npass
src.roomtype=Nstatus
src.roomtopic=Ntopic
src.room_master=Nmaster

Click()
..()
alert("It works!")//for confirmation
winshow(src,"join_room",1)
winset(usr,"roomname_label","text=\"[src.name]\"")
winset(usr,"roommaster_label","text=\"[src.room_master]\"")
usr << output("[src.roomtopic]","topic_output")
if(src.roompassword=="Locked")
winset(usr,"label18","is-disabled=false")
winset(usr,"joinpassword","is-disabled=false")

This is my obj and Click proc

mob/verb/NewRoom()
if(usr.hasroom==0)
usr.hasroom=1
var/rstatus
var/rname=winget(usr,"room_creation.room_name","Text")
var/rpass=winget(usr,"room_creation.room_password","Text")
var/rtopic=winget(usr,"room_creation.room_topic","Text")
winset(usr,"room_creation.room_name","text=")
winset(usr,"room_creation.room_password","text=")
winset(usr,"room_creation.room_topic","text=")
if(!rtopic)
rtopic="No Topic"
if(rpass)
rstatus="Locked"
else
rstatus="Open"
var/R=new/obj/Room(rname, rpass, rstatus, rtopic, usr)
rooms+=R
winshow(src,"room_creation", 0)
winset(usr,"create_room_button","is-disabled=true")
WriteRooms()
return
if(usr.hasroom==1)
usr << output("Server Bot: [usr.key], You already have a room","lobby_output")


Problem: Clicking the grid cell doesn't work. It doesn't pop up the "It works!" alert or follow any of the other commands. What am I doing wrong or how can I fix this?

Thanks in advance
You seem to be using a topic var, which suggested to me that you would be using client/Topic(). I don't believe Grids register Click() unless the object has an icon. I may be wrong, as I haven't tested this, but in my experience they can be a bit tricky.
In response to Albro1
Ah, thanks and yes, you're right. I was using client/Topic()

ExPixel fixed me. My proc to click the obj was perfect, except I had sent var/obj/Room/R src<<output(R.name,"grid:1,1") instead of src<<output(R,"grid:1,1")

A simple mistake that caused me many facedesks.