Difference between revisions of "XsConnectToDatabase"
Jump to navigation
Jump to search
Smiley Barry (talk | contribs) (New page: {{LSL Function/warning |1=Software Dependency |2=This specific command and other "'xs'-prefixed" commands require the Xenon Systems runtime script, and several blocks of code for the alias...) |
m (warnings etc get inject-1) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{LSL Function/warning | {{LSL_Function | ||
|inject-1={{LSL Function/warning | |||
|1=Software Dependency | |1=Software Dependency | ||
|2=This specific command and other "'xs'-prefixed" commands require the Xenon Systems runtime script, and several blocks of code for the aliases (commands with the "xs" prefix). | |2=This specific command and other "'xs'-prefixed" commands require the Xenon Systems runtime script, and several blocks of code for the aliases (commands with the "xs" prefix). | ||
}} | }} | ||
|mode=user | |||
|func=xsConnectToDatabase | |func=xsConnectToDatabase | ||
|func_desc=Connects to database '''id''' with user ID '''user''' and password '''password'''. Also uses '''params''' for additional parameters if used. | |func_desc=Connects to database '''id''' with user ID '''user''' and password '''password'''. Also uses '''params''' for additional parameters if used. | ||
|sort=ConnectToDatabase | |sort=ConnectToDatabase | ||
|func_id | |func_id | ||
|func_sleep=5.0 | |func_sleep=5.0 | ||
|func_energy=10.0 | |func_energy=10.0 | ||
Line 24: | Line 23: | ||
** This product is pending a {{DuoGrid Link}}-Compatible badge. This will make it work on the Main Grid as well. | ** This product is pending a {{DuoGrid Link}}-Compatible badge. This will make it work on the Main Grid as well. | ||
|examples= | |examples= | ||
< | <lsl>default | ||
default | |||
{ | { | ||
xsConnectToDatabase(integer id, string user, key password, list params) | xsConnectToDatabase(integer id, string user, key password, list params) | ||
Line 43: | Line 41: | ||
xsConnectToDatabase(39,"Average_User",123456,["mode.sysop"]); | xsConnectToDatabase(39,"Average_User",123456,["mode.sysop"]); | ||
} | } | ||
} | |||
//That will start the connection, and finally the runtime script will "say" the results in | |||
//the chosen format. | |||
//If the owner chose to display them public, it will show them in [[DEBUG_CHANNEL]]. | |||
//Results: | |||
//XS Runtime (Object): Connection successful, however, 1 warning has occurred. | |||
//XS Runtime (Object): WARNING 29: Your parameter "Mode.Sysop" has been declined by the server. | |||
You are connected as your permission level allows (Bureaucrat). | //You are connected as your permission level allows (Bureaucrat). | ||
</lsl> | |||
</ | |||
|helpers | |helpers | ||
|also_header | |also_header |
Latest revision as of 21:08, 10 June 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: xsConnectToDatabase( integer id, string user, key password, list params );Connects to database id with user ID user and password password. Also uses params for additional parameters if used.
• integer | id | – | Database ID. Must be registered with central server!. | |
• string | user | – | User ID to login to database. Must use underscores (_) instead of spaces. | |
• key | password | – | Associated ID password. Must be between 4 and 16 chars. Only numbers and letters are accepted. | |
• list | params | – | Parameters to change default settings to suit the current session. (Optional) |
Caveats
- This function causes the script to sleep for 5.0 seconds.
- This script requires the Xenon Systems Runtime File and a few code modifications to include the appropriate aliases.
- The object containing the runtime file will change its name for any notifications. However, it will change back as soon as the notification has been sent. (For example, from "Object" to "XS Runtime (Object)" and back.)
- This command, associated dependencies, and supported products are available only on the Teen Grid at the moment.
- This product is pending a DuoGrid-Compatible badge. This will make it work on the Main Grid as well.
Examples
<lsl>default {
xsConnectToDatabase(integer id, string user, key password, list params) {llMessageLinked(LINK_SET,0215,id + "~" + user + "~" + password,llDumpList2String(params,"