OsFormatString: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>Fritigern
No edit summary
imported>Fritigern
mNo edit summary
Line 28: Line 28:


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

Revision as of 23:22, 8 June 2011

OsFormatString
Threat Level <Threat Level goes here>
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>