Datum
New()
//do stuff to figure out x
return x
mob
proc
check_value()
var/return_value = new/Datum
world << "[return_value] is what you were looking for!"
However that won't work because the variable only stores the new datum, and not it's return value.
I had to do this instead:
Datum
New(isreal)
if(!isreal) return
//do stuff to figure out x
return x
mob
proc
check_value()
var/Datom/datum = new/Datum()
var/return_value_of_datum = datum.New(1)
That seems ugly though, is there a better way assuming I really want to use a datum in this circumstance?