I've tried multiple times, and I've failed in every single one of them.
// Attempt #1
mob
verb
test()
var/icon/i = new('Light.dmi',"50")
i += rgb(1,1,1)
icon = i
// Attempt #2
mob
verb
test()
var/icon/i = new/icon('Light.dmi',"50")
i += rgb(1,1,1)
icon = i
// Attempt #3
mob
verb
test()
var/icon/i = icon('Light.dmi',"50")
i += rgb(1,1,1)
icon = i
Every single one of them return,
runtime error: type mismatch: /icon (/icon) += "#010101"
proc name: test (/mob/verb/test)
source file: Icon.dm,5
usr: Gooseheaded (/mob)
src: Gooseheaded (/mob)
call stack:
Gooseheaded (/mob): test()
But if I use
mob
verb
test()
var/icon/i = icon
i += rgb(1,1,1)
icon = i
I get no errors.
What do I have to do to get it done, properly?
What am I doing wrong?
Why the heck does it work with src.icon but not with a runtime-generated icon?
Thanks for reading!