```
var value = 444
mob/Login()
Example(&value)
world << "value: [value]"
proc/Example(value)
*value = 333
Example2(&value)
proc/Example2(value)
*value = 222
```
Problem description:
Trying to create something but having issues with pointers, so the reference/pointer to them is lost after a single proc call?
The above outputs value: 333 when I think it should return 222, however if I just pass the variable without & or * it causes it to output
&NORTH and <prob[1].x>
var/smart_variables/sv = new
smart_variables
var pref
var list/refs
New()
refs = new/list(128)
spawn()
var tick = world.tick_lag
var ref, list/l
for()
sleep(tick)
for(ref in refs)
if(!ref){continue}
world << "[ref[1]] vs [*ref[2]]"
if(*ref[2] != ref[1])
ref[1] = *ref[2]
switch(ref:len)
if(3)
call(ref[3])(ref[1])
proc/follow_changes(variable,function)
sv.refs[++sv.pref] = list(*variable, &variable, /proc/Example)
Trying to create a datum that contains a list such as the pointer to the variable so I can loop and find if said variable's value has changed so that I may call a function.
Trying to create a better version of this
This will perform as you expect.