Generating Objects from Icons in Folder in Developer Help
|
|
Code:
proc CacheHairs() for(var/X in flist("Hairs/Base/")) var/icon/I=new("Hairs/Base/[X]") var/obj/Hair/H = new() H.icon = I Hairs += H
mob proc LoadHairs(list/HairList) var/HairsVar=1 for(var/x in HairList) HairsVar++ winset(src,"HairGrid","current-cell=1x[HairsVar]") src << output(x,"HairGrid")
|
Problem description:
No hairs are shown. When the "world <<" line is not omitted, it posts as intended. When outputting the objects to HairGrid, nothing is shown.
Can provide more information on demand.
|
++var adds 1 and returns the value. var++ is returning the value before adding 1.
Did you passed Hairs as the argument? Did you make sure that the grid's ID is spelled correctly and the case sensitivity is correct?