• Using " in a DButton
    8 replies, posted
I need to print something like... ZackLol "Yes" "No" IT CANNOT BE ZackLol 'Yes' 'No' How can I do this and make it work in a DButton or DTextEntry?
[QUOTE=zzaacckk;25964495]I need to print something like... ZackLol "Yes" "No" IT CANNOT BE ZackLol 'Yes' 'No' How can I do this and make it work in a DButton or DTextEntry?[/QUOTE] Use an escape sequence. [lua] Msg("blah blah \"lol\"") [/lua] Will print: blah blah "lol"
Nevermind.
Just sayin', even though it's solved, if you need to use ", surround the string in '
Or do it properly and escape the characters like Jcw87 suggested.
[QUOTE=_nonSENSE;25986574]Or do it properly and escape the characters like Jcw87 suggested.[/QUOTE] Neither way is more proper than the other.
I tend to only use ' when dealing with characters. Surrounding a string with 's just looks wrong to me. Furthermore, this way you are consistent and don't end up double-checking if you started enclosing the string with " or '.
If you can't remember whether you opened a string with ' or ", you have a problem.
Or use open/close strings with [[It's "hot" in here.]]
Sorry, you need to Log In to post a reply to this thread.