OsFormatString

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New page: '''string osFormatString(string format,list params)''' <source lang="lsl"> // //osFormatString example, by Tom Earth. // default { state_entry() { string to_format = "My n...)
 
Line 3: Line 3:
 
<source lang="lsl">
 
<source lang="lsl">
 
//
 
//
//osFormatString example, by Tom Earth.
+
//osFormatString() example, by Tom Earth.
 
//
 
//
 
default
 
default

Revision as of 13:48, 17 January 2010

string osFormatString(string format,list params)

//
//osFormatString() example, by Tom Earth.
//
default
{
    state_entry()
    {
        string to_format = "My name is {0}. My owner is {1}. I am in the sim {2}";
        list format = [llGetObjectName(),llKey2Name(llGetOwner()),llGetRegionName()];
        llOwnerSay(osFormatString(to_format, format)); 
    }
}
Personal tools
General
About This Wiki