ID:145608
 
Code:
turf/grass
icon='grass.dmi'
New()
..()
icon=icon.SetIntensity(r=1,g=2,b=1)
icon=icon.Turn(20)
icon+=rgb(rand(4,6),rand(5,8),rand(4,8))


Problem description: None of the icon procs work. I get a compile error for both top two. "invalid expression"

First, you must never ever use a single space to represent tabs. Use at least two spaces, for clarity.

You're confusing regular icons with the /icon datum. They're not the same thing.

The icon var, for one thing, has no type to it; it's just a var. The value it stores is going to be either a cache reference or null, based on the way it's handled internally. The SetIntensity() and Turn() procs belong to the /icon datum. Since you're making so many changes to the icon, you'll definitely need to use the datum.
var/icon/I = new(initial(icon))
I.SetIntensity(1,2,1)
I.Turn(20)
I.Blend(rgb(rand(4,6),rand(5,8),rand(4,8)), ICON_ADD)
icon = I

Now, the icon=I line is equivalent to icon=fcopy_rsc(I), since internally BYOND will make a copy of the /icon and turn it into a cache reference.

Lummox JR