ID:2111669
 
(See the best response by FKI.)
Code:
obj
ball1
icon = 'ball1.dmi'
Click()
var/obj/ball2/x = new/obj/ball2()
x.screen_loc = "1, 1"
screen += x


Problem description: Tried the above in an effort where, if the object ball1 is clicked, it appears another screen object ball2 permanently on the screen, but the above code gives screen: undefined var...

Why do you think it's telling you that "screen" is not defined?
Best response
screen += x

// The above is identical to:

src.screen += x


With this in mind, consider what src is: the object being clicked (the ball1 obj).

I think what you want to put there is the user clicking the object, or more specifically, their client. You can interact with the user through the usr variable, i.e. usr.client.screen, for example.