Is it possible to use "" inside a string and have them recognised as a string?
If it's the same as PHP, you may try to use \" .
But I'm not a LUA coder, so I don't really know.
Yup, it's called string escaping.
You can read about it here : [url]http://wiki.garrysmod.com/?title=Escaping[/url]
It's called escaping. Just precede the quotation mark with a back slash.
[lua]"This is a \"string\""[/lua]
[editline]05:10PM[/editline]
Ninja'd twice :ninja:
Thanks :D
Another way to do it:
[lua][[This is a "string"]][/lua]
Or delimit the string with ' and ' instead of " and ".
'This is a "perfectly valid" string.'
[QUOTE=DarkTyrael;20042194]Another way to do it:
[lua][[This is a "string"]][/lua][/QUOTE]
So could it work like
[lua]
print([[This is a "string"]])
[/lua]
?
Yes
Edit: 1500 posts.
Ok, haha.
Sorry, you need to Log In to post a reply to this thread.