ID:1976270
 
Code:
obj
Blank
icon = 'blank.dmi'
layer = FLOAT_LAYER
mob
Person
icon = 'female pale blue eyes.dmi'
icon_state = "walk"
verb

upload(icon/F as file) // Overlay
var/icon/I = new(F)
if(I.Width()==96&&I.Height()==96)
var/obj/Blank/D = new /obj/Blank
D.icon = I
D.pixel_x = -32
D.pixel_y = -32
usr.overlays += D
return
usr.overlays += F
upload2(icon/F as file) // Underlay
var/icon/I = new(F)
if(I.Width()==96&&I.Height()==96)
var/obj/Blank/D = new /obj/Blank
D.icon = I
D.pixel_x = -32
D.pixel_y = -32
usr.underlays += D
return
usr.underlays += F // *Edit fix*


Problem description:
When I upload an icon using this, some will show (both 32x32 and 96x96 icons), while others simply won't show. If I make an object with one of the icons that won't show, it'll show when uploaded through the verb, so I'm assuming its some kind of ressource error or something with permissons, but I simply can't figure out what's wrong.

Please help >.<
I'm not sure what you mean exactly about using the verb; those are both verbs. Is there some other method you use to show an icon?

Also, your upload2 verb has a copy/paste error on the last line, as it's adding to overlays instead of underlays.
The last line on the second verb is because I failed to paste it properly, then just editted it manually and forgot that it was supposed to be underlays.

But the issue is with both verbs; Some icons that I upload work, while others don't. I can even completely imitate an icon with every state and it'll work, while the original just refuses to.

The issue is frankly just that some icons being uploaded will show, while others won't, despite there being no logical explanation as to why one is working over the other. They're basically the same.
Is it always the same specific icons that don't show? That could be a big clue.
It's always the same specific icons, but we're talking several hundred icons that work on other games. (In this case Eternia)

Could the issue be that they're icons made a long time ago(year(s?))
It seems unlikely that old-style DMI 3 icons would have trouble of this sort.
When I recreate them as a new .dmi, it works.
The issue is resolved when I add a blank icon state to the ones who doesn't work (Mind you, that the ones who already work prematurely, doesn't have a blank icon state at any given time).

It's purely illogical, but it seems that the part of "icon/F as file" can't read some icons. It outputs the name of some of them as alert(F), while most are just a big blank alert.
In response to WhoElse123
WhoElse123 wrote:
The issue is resolved when I add a blank icon state to the ones who doesn't work (Mind you, that the ones who already work prematurely, doesn't have a blank icon state at any given time).

It's purely illogical, but it seems that the part of "icon/F as file" can't read some icons. It outputs the name of some of them as alert(F), while most are just a big blank alert.

I couldn't reproduce what you described. However, you should be searching for an icon, not a file, to pass to the icon object F. Ex:

verb/upload(var/i as null|icon)


That may be why I can't reproduce it because I used the correct type argument.
I already tried "as icon", it doesn't work. Several other people have my issue as well, apparently.

I had to add a blank icon state (for no reason) to an old icon for it to work. Despite the working icons not having a blank icon state.
Can you supply me a copy of some of the icons that don't work, and maybe a little test project that shows this in action? (The former alone may be enough.)
http://puu.sh/l9kxS/60110c3be9.rar

Basically every icon for me doesn't work properly.