OsLoadedCreationDate
From OpenSimulator
(Difference between revisions)
m (XEngine to OSSL) |
(Better exemple) |
||
Line 4: | Line 4: | ||
|delay=0 | |delay=0 | ||
|function_syntax=string osLoadedCreationDate() | |function_syntax=string osLoadedCreationDate() | ||
+ | |description=*This function returns a string containing the date that a sim was first created. An example of the string returned is "Monday, December 07, 2009". | ||
+ | * It will return empty string if the region hasn't been created by oar import, or the region uses SQLite for region database. | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | // | + | // |
+ | // osLoadedCreationDate Script Exemple | ||
+ | // Author: djphil | ||
+ | // | ||
− | default { | + | default |
− | + | { | |
− | + | state_entry() | |
− | + | { | |
− | + | llSay(PUBLIC_CHANNEL, "Touch to see osLoadedCreationDate usage."); | |
− | + | ||
} | } | ||
− | |||
− | |||
− | |||
− | + | touch_start(integer number) | |
+ | { | ||
+ | string CreationDate = osLoadedCreationDate(); | ||
+ | |||
+ | if (CreationDate == "") | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "The region hasn't been created by oar import, or the region uses SQLite for region database."); | ||
+ | } | ||
− | | | + | else |
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "The first creation date is " + CreationDate); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | |additional_info= | ||
}} | }} |
Revision as of 18:21, 5 December 2020
string osLoadedCreationDate()
| |
| |
Threat Level | Low |
Permissions | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osLoadedCreationDate Script Exemple // Author: djphil // default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osLoadedCreationDate usage."); } touch_start(integer number) { string CreationDate = osLoadedCreationDate(); if (CreationDate == "") { llSay(PUBLIC_CHANNEL, "The region hasn't been created by oar import, or the region uses SQLite for region database."); } else { llSay(PUBLIC_CHANNEL, "The first creation date is " + CreationDate); } } } |