Difference between revisions of "LlGetEnv"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 4: Line 4:
|func= llGetEnv |sort= llGetEnv
|func= llGetEnv |sort= llGetEnv
|return_type=string
|return_type=string
|p1_type=string|p1_name=name|p1_desc
|p1_type=string|p1_name=name|p1_desc=The name of the data to request
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=with the requested data about the region where the script is running.
|return_text=with the requested data about the [[region]].
|spec
|spec
|caveats
|caveats
|constants=
|constants=
{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
{{!}}+ Table of valid '''{{LSL Param|name}}''' values.
{{!}}-{{Hl2}}
{{!}}-{{Hl2}}
! {{!}} Name
! {{!}} Name
Line 27: Line 28:
     touch_start(integer total_number)
     touch_start(integer total_number)
     {
     {
        string version = llGetEnv("sim_version");
         llOwnerSay("Region " + llGetRegionName() + " is running "
         llOwnerSay("Region " + llGetRegionName() + " is running "
                   + llGetEnv("sim_channel") + " version " + llGetEnv("sim_version"));
                   + llGetEnv("sim_channel") + " version " + version );
 
        llOwnerSay("Build: "+llList2String(ver, 3));
 
        list ver = llParseString2List(version, ["."], []);
        llOwnerSay("Build Date: "+llList2String(ver, 2)+"-"+llList2String(ver, 1)+"-20"+llList2String(ver, 0));
     }
     }
}
}

Revision as of 09:52, 2 December 2010

KBcaution.png Important: This feature is currently only available on the LeTigre server channel.

Summary

Function: string llGetEnv( string name );

Returns a string with the requested data about the region.

• string name The name of the data to request

Table of valid name values.
Name Description
"sim_channel" Get the current region's channel string, for example "Second Life Server"
"sim_version" Get the current region's version number string, for example "10.11.30.215699"

Examples

<lsl> default {

   touch_start(integer total_number)
   {
       string version = llGetEnv("sim_version");
       llOwnerSay("Region " + llGetRegionName() + " is running "
                  + llGetEnv("sim_channel") + " version " + version );
       llOwnerSay("Build: "+llList2String(ver, 3));
       list ver = llParseString2List(version, ["."], []);
       llOwnerSay("Build Date: "+llList2String(ver, 2)+"-"+llList2String(ver, 1)+"-20"+llList2String(ver, 0));
   }

}

</lsl>

See Also

Deep Notes

History

Search JIRA for related Issues

Signature

function string llGetEnv( string name );