Problem description:I need the [P.Type1] to be in that special color, like it is when it's between "" but the icon itself needs to be in ''. How can I get it to work? Thanks.
You can not do what you described, since 'filename.extension' does compile-time checking on the resource. In order to reference a file during run-time, you could use file(Path).
If you want an image you can just add another map control, and make the image display in that, then you can easily do it, just look up in DM (HUD / screen objects) that will tell you that you can output screen objects to a map control other than that of the default map control.
If you want an image to the label you can set one from the interface file itself as well.
If you want the image to change as well in a label you could also use winset() to hide one label, and show another that has the different image already.
Or you could wait for someone else to tell you how to set the image via winset().
Yeah I am trying to set the image via winset(). I know how to do that without the variable, but with it, I can't get it to work. Thanks for the help anyway though.
I've tried to use the code but it gives me a bad icon operation runtime. I've tried to change it up a little hoping I can get the problem fixed but no luck. Any idea why?
Does your dmi file contain only a single icon_state with the name ""? Else you might have to refrain to the icon proc, though I'm just guessing here, as the code snippet works perfectly fine with me.
The file is in a folder called Types and only has one icon_state with no name underneath it. By folder, I mean it's not directly inside of the project folder but in a sub-folder within that.