ID:148183
 
Anyways, this little tidbit keeps boggling out after a while. No errors or anything, just um..After a while, all player icons disappear and the host is flooded with Null.New() errors. If anybody could come up with a solution, that would be helpful.
    playericon(ahead,abody,aarms,alegs,apri1,asec1)
var
icon
head
body
arms
legs
pri1
sec1
pri2
sec2
switch(apri1)
if("red")
pri1 = rgb(255,0,0)
pri2 = rgb(205,0,0)
if("green")
pri1 = rgb(0,255,0)
pri2 = rgb(0,205,0)
if("yellow")
pri1 = rgb(255,255,0)
pri2 = rgb(205,205,0)
if("blue")
pri1 = rgb(0,0,255)
pri2 = rgb(0,0,205)
if("violet")
pri1 = rgb(255,0,255)
pri2 = rgb(205,0,205)
if("black")
pri1 = rgb(50,50,50)
pri2 = rgb(10,10,10)
if("white")
pri1 = rgb(255,255,255)
pri2 = rgb(205,205,205)
switch(asec1)
if("red")
sec1 = rgb(245,0,0)
sec2 = rgb(195,0,0)
if("green")
sec1 = rgb(0,245,0)
sec2 = rgb(0,195,0)
if("yellow")
sec1 = rgb(245,245,0)
sec2 = rgb(195,195,0)
if("blue")
sec1 = rgb(0,0,245)
sec2 = rgb(0,0,195)
if("violet")
sec1 = rgb(245,0,245)
sec2 = rgb(195,0,195)
if("black")
sec1 = rgb(40,40,40)
sec2 = rgb(0,0,0)
if("white")
sec1 = rgb(245,245,245)
sec2 = rgb(195,195,195)
switch(ahead)
if("normal")
head = new('head1.dmi')
if("bow")
head = new('head2.dmi')
head.SwapColor(rgb(245,245,245),pri1)
head.SwapColor(rgb(203,203,203),pri2)
head = new /image(icon = head,layer = MOB_LAYER+0.01,pixel_y = 10)
switch(abody)
if("normal")
body = new('body1.dmi')
if("fat")
body = new('body2.dmi')
if("dress")
body = new('body3.dmi')
if("armor")
body = new('body3.dmi')
body.SwapColor(rgb(0,0,255),sec1)
body.SwapColor(rgb(0,0,153),sec2)
body = new /image(icon = body,layer = MOB_LAYER)
switch(aarms)
if("normal")
arms = 'arms1.dmi'
arms = new /image(icon = arms,layer = MOB_LAYER)
switch(alegs)
if("normal")
legs = 'legs1.dmi'
legs = new /image(icon = legs,layer = MOB_LAYER)
var/list/L = list(legs,body,arms,head)
return L
..Knock knock?
In response to Buzzyboy
Sigh..This goes unanswered, I guess..
Possibly a BYOND memory leak, since no one seems to be answering this.