Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Speech Marks

Fluffy Loon
Registered User
Join date: 26 Jul 2007
Posts: 2
08-01-2007 11:30
Hi! Couldn't find this anywhere via search or google.

Inside a script speechmarks are oftne needed. but what about if you wanted to quote speech marks?

Don't fully know how to explain.
example
CODE

default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}

touch_start(integer total_number)
{
llSay(0, ""Touched."");
}
}


which of course wouldnt work due to double speechmarks

How would I make it say

"Touched."

and not just

Touched.

thanks.


EDIT: Sigh - sorry, i had a spur of inspiration as soon as i hit post (after hours of brain attacking).

Answer: \"

llSay(0, "\"Touched.\"";);
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-01-2007 12:23
Just FYI, they are called "quotes", (more properly) "double quotes", or (most properly) "quotation marks".
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-01-2007 12:58
To include a quotation mark in a string, preceed it with a backslash. For example:

llSay(0, "\"Touched.\"";);

This would output:

Object: "Touched."

Or a clearer example:

llSay(0, "enclose \"SOMETHING\" in quotes";);

would output:

Object: enclose "SOMETHING" in quotes