ID:263522
 
Code:
obj
ammocase
ammo=5
Click()
for(var/obj/pistol/P in contents)
P.casing = src
break
obj
pistol
casing
Click()
casing:ammo -= 1


Problem description:
This is just a random example describing my problem, it has nothing to do with pistols and ammo, and it can not be circumvented the way I describe it here.

How can I access the vars of a reference, without using :
maybe make a var for the casing like var/obj/ammocase/A or somthing along those lines, think you can do that in a for() so why not outside it?
SSJ4 Compufreak wrote:
How can I access the vars of a reference, without using :

You shoulnd't even be using :, that would be abuse buddy. Use . EX usr.HP
Typecast it.

var/m //Requires the use of :
var/mob/m //Allows you to access mob variables
In response to Pyro_dragons
Dude, that's the whole POINT of this topic, I do not wish to use : because obviously, that ain't good.

EDIT: Thanks JP, problem solved.