obj
Control_Console
icon='Console.dmi'
Click()
set src in oview(1)
switch(alert("Do you want to activate the Glasglow?",,"Yes","No"))
if("Yes")
var/mob/Glasgow/K = locate(/mob/Glasgow) in world
if(K)
if(K.pilot==usr)
usr.client.eye=K
else
usr<<"There is no Glasgow"
Problem description:Yeah I know im doing it wrong somehow but it keeps saying there no glasgow in the world when indeed there is:P.If anyone figures out my mistake or an alternate working coding method I could use instead,thanks.
Also, please don't mix tabs and spaces for indentation, and don't use a single space for indentation. It'll hurt the eyes of any helpful soul who has to read your code.
Oh, and the src setting (set src in oview(1)) only works for verbs, not processes like Click(). You need to do something like if(get_dist(src, usr) <= 1) instead.