ID:2335053
 
(See the best response by CrimsonVision.)
Code:
mob
Fan_02
icon='NPCs.dmi'
icon_state = "fan2"
FaceCon = "Tom"
event="ShowText"
event_ShowText="Fan: You must be [src.name]?"
event_relay = TRUE
event_window_color = "blue" //Color to be used for the window. Must match one of the available icon states in HUD_windows.dmi.
event_window_screenloc = "1:16,1:24" //screen_loc to be used for the window


Problem description:
Trying to add it in for Woo's HUD/Text box system where like in classic RPG's the user's name appears in the box, but for some reason it's giving me a constant expression error in the "event_ShowText" line.

Also mentioned that src.name is undefined var, but it's not so that's strange too.
Best response
You can't use embedded expressions ("text text [some expression]") in definitions, you have to do it in a proc or verb, in this case you're probably best off to put it in New().

mob
Fan_02
icon='NPCs.dmi'
icon_state = "fan2"
FaceCon = "Tom"
event="ShowText"
event_relay = TRUE
event_window_color = "blue" //Color to be used for the window. Must match one of the available icon states in HUD_windows.dmi.
event_window_screenloc = "1:16,1:24" //screen_loc to be used for the window
New()
..()
event_ShowText = "Fan: You must be [src.name]?"

However, I'm not sure you meant to use src, first of all because you don't need src.X to access var X on src, but also because in this case src is the fan, so you'd end up with: "Fan: You must be Fan_02?"
In response to CrimsonVision
So obvious. I feel stupid.

Thanks!