ID:266750
 
How do I fix this?
        var/usr.Type/F = new(src)
if(Night == 1)
F.icon = 'night.dmi'
else
F.icon = 'day.dmi'
mob/proc/ReturnType(mob/M)
return M.type

var/O = ReturnType(src)
var/O/F = new(src)

Try that?
In response to Super16 (#1)
Super16 wrote:
mob/proc/ReturnType(mob/M)
return M.type

var/O = ReturnType(src)
var/O/F = new(src)

Try that?

Gads no. That won't work at all. Please don't just spew out random advice.

Lummox JR
In response to Lummox JR (#2)
Well stop your bitchin and through something out there ;)
Thief jack wrote:
How do I fix this?
var/usr.Type/F = new(src)

You can't declare a var with a type path that isn't known at compile-time. It's the var/<don't&nbsp;know>/F that's your problem. What you need to do is this instead:
var/mob/F = new usr.Type(src)

Assuming usr.Type is a type path like /mob/red or a string like "/mob/cow", this will work.

It's fine to use a variable type path as part of new(), but not as part of var/.../F.

Lummox JR