player
Click(location="privatechatgrid",control="PrivateChatWindow")
alert(src,"IT WORKS!")
or
player
Click(A,B)
if(A == "privatechatgrid" && B == "PrivateChatWindow")
alert(src,"IT WORKS!")
player
parent_type = /mob
Problem description:
What I'm trying is, is when I click on the mob on my list(grid), that the alert pops out.
With the first code, when I click on the mob on the grid. The alert pops out. But when I click on the mob on the map, the alert also pops out.
The second code, for some reason, it won't work.
Sorry for my english.
The problem was that you were trying to think of the location as an interface element. The location is generally speaking either a turf or null. Testing where in the interface the object is being clicked on is done through the control argument.
Your first example wasn't actually checking anything. You were just setting the default value of those arguments, which were then overridden by the default behavior of the Click proc.