in chat window everything works well, but it does not when I try the above code. So I guess issue is not with SendChatMessage but the rest, which worked just fine until I changed print("message") for Senchatmessage.
I can't find the mistake and wow is not throwing any errors, so it just makes it harder to find. Any help?
Because people were using it as a way to spoof chat messages or to spoof messages from GMs - this is also why they added the icon for GM names and then the GM conversation window. If players had not altered the width of their chat windows, people would put in the proper amount of spaces to make it go onto the next line.
In the below example, I've substituted _ for spaces.
Hackerguy whispers: Are you an alchemist?_____________________________
GMguy whispers: We've had reports about this character. Can you verify
your account name and password to ensure everything is alright