OsFormatString: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>Fritigern
mNo edit summary
imported>Fritigern
mNo edit summary
Line 2: Line 2:
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
|- valign="top"
|- valign="top"
|'''Threat Level''' || <Threat Level goes here>
|'''Threat Level''' || Low


|- valign="top"
|- valign="top"
Line 28: Line 28:


[[Category:OSSL Functions]]
[[Category:OSSL Functions]]
[[Category:OSSL functions without threat level]]

Revision as of 20:25, 11 June 2011

OsFormatString
Threat Level Low
Function Syntax
string osFormatString(string format,list params)
Example(s)
//
//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)); 
    }
}

<Additional info/content goes here>