From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(osMakeNotecard always take a list for its second argument, never a string!)
Line 2: Line 2:
|function_syntax=void osMakeNotecard(string notecardName, list contents)
|function_syntax=void osMakeNotecard(string notecardName, list contents)
void osMakeNotecard(string notecardName, string contents)
|ossl_example=<source lang="lsl">
|ossl_example=<source lang="lsl">

Revision as of 13:23, 15 May 2013

void osMakeNotecard(string notecardName, list contents)
Creates a notecard with text in the prim that contains the script. Contents can be either a list or a string.
Threat Level High
Permissions No permissions specified
Delay No function delay specified
//osMakeNotecard example
//By Tom Earth
    touch_start(integer n)
        key id = llDetectedKey(0);
        string name = llKey2Name(id);
        list contents; //The variable we are going to use for the contents of the notecard.
        contents += ["Name: "+name+"\n"];
        contents += ["Key: "+(string)id+"\n"];
        contents += ["Pos: "+(string)llDetectedPos(0)+"\n"];
        contents += ["Rotation: "+(string)llDetectedRot(0)+"\n"];
        osMakeNotecard(name,contents); //Makes the notecard.
        llGiveInventory(id,name); //Gives the notecard to the person.
Personal tools
About This Wiki