Originally Posted by TransformedBG
So i would need to extract the name then do a simple code like
Code:
local name = string.match(msg, "(.+) has came online.);
if ( (name ~= self) ) then
SendChatMessage("Hello "...name..."! Nice to see you on today!", "GUILD", nil, nil);
end
|
You're getting there, but again, as Xinhuan stated: self is a reference to the frame, not the specific player's name. You may need to tweak your string matching to accommodate for false positives from other situations by CHAT_MSG_SYSTEM. After that, nil checking the name should be sufficient. Lastly, I'm not sure if this is just a typo, but I notice you have three dots when you're concatenating the variable in the string. Concatenation is two dots, and a Vararg is three dots.