Skip to content
lsl.devlsl.devLSL Dev

llGetSimulatorHostname

function
Function syntax
string llGetSimulatorHostname();
Returns
string
Delay
10 s
Energy
10

Returns a string containing the hostname of the server machine running the script (e.g., 'sim225.agni.lindenlab.com').

Returns a string that is the hostname of the machine the script is running on (same as string in viewer Help dialog)

How to use
string result = llGetSimulatorHostname();
Example 1
13 collapsed lines
// The beginnings of a region-info script.
string region;
string sim;
default
{
state_entry()
{
llSetTimerEvent(1.0);
}
timer()
{
string here = llGetRegionName();
if(region != here)
{
sim = llGetSimulatorHostname();
region = here;
}
8 collapsed lines
llSetText(
" REGION NAME : " + region +
"\n SIM HOSTNAME : " + sim +
"\nTIME DIALATION : " + (string)llGetRegionTimeDilation() +
"\n REGION FPS : " + (string)llGetRegionFPS(),
<0,1,0>, 1.0);
}
}
Example 2
// llGetEnv now offers an equivalent function without the 10 second delay.
SaySimulatorHostname()
{
llOwnerSay("Simulator Hostname: " + llGetEnv("simulator_hostname") );
}
default
{
on_rez(integer start_param)
{
SaySimulatorHostname();
}
changed(integer iChange)
{
if (iChange & (CHANGED_REGION_START|CHANGED_REGION))
SaySimulatorHostname();
}
state_entry()
{
SaySimulatorHostname();
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.