hi, am getting this error for lsl code below, can you fix? (130,4) Error CS0103: The…
- User
hi, am getting this error for lsl code below, can you fix? (130,4) Error CS0103: The name 'llLinksetDataDeleteProtected' does not exist in the current context (135,16): Error CS0103: The name 11LinksetDataWrite Protected' does not exist in the current cont... , integer APP = 56942456; // /////////////////////////////////////////////////////////////////// // CONSTANTS // /////////////////////////////////////////////////////////////////// float PARTICLE_TIME = 10.0; float s_VOLUME = 1.0; string DBPASSWORD = "sd9523fd+e&cewqQ"; string NOTECARD_NAME = "Settings"; string HANDS = "second hand"; integer DIALOG_TIME = 30;
list t_PARTICLES = [ "9f602fc3-5132-4d92-978b-dcbe9d4ade81", "64597ea8-0501-442d-a607-a2c9867845bc", "a5b153d3-e77d-46e3-b271-270d5000237b", "996c639b-9b59-490d-bf93-5cf562b7e9d4", "d11f626e-2d39-4e29-b031-854665f174a2", "8e3327e2-6117-4b68-b3b7-0fc6cab983f5" ];
key s_CHIME = "b087dd8e-a09e-41be-869e-31d489ee0b83"; key s_TICK = "4046a28e-7692-4ac0-90de-d06b59edf6b0"; // /////////////////////////////////////////////////////////////////// // VARIABLES // /////////////////////////////////////////////////////////////////// key gDialogUser = NULL_KEY; integer gParticles = TRUE; list gHands = [ ];
vector gHandStep; key gNoteQueryID; integer gNotecardLine; list gNoteList; integer gChannel; integer gListener; integer gDialogTimeUp; integer gPlay;
// /////////////////////////////////////////////////////////////////// // FUNCTIONS // /////////////////////////////////////////////////////////////////// particles( integer stat ) { list particle_params = [ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, PSYS_SRC_BURST_RADIUS, 2, PSYS_SRC_ANGLE_BEGIN, 0, PSYS_SRC_ANGLE_END, 0, PSYS_SRC_TARGET_KEY, llGetKey( ), PSYS_PART_START_COLOR, <1.000000,1.000000,1.000000>, PSYS_PART_END_COLOR, <1.000000,1.000000,1.000000>, PSYS_PART_START_ALPHA, 1, PSYS_PART_END_ALPHA, 0.5, PSYS_PART_START_GLOW, 0.2, PSYS_PART_END_GLOW, 0, PSYS_PART_BLEND_FUNC_SOURCE, PSYS_PART_BF_SOURCE_ALPHA, PSYS_PART_BLEND_FUNC_DEST, PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_PART_START_SCALE, <2.000000,2.000000,0.000000>, PSYS_PART_END_SCALE, <3.000000,3.000000,0.000000>, PSYS_SRC_MAX_AGE, PARTICLE_TIME, PSYS_PART_MAX_AGE, 10, PSYS_SRC_BURST_RATE, 0.5, PSYS_SRC_BURST_PART_COUNT, 1, PSYS_SRC_ACCEL, <0.000000,0.000000,0.000000>, PSYS_SRC_OMEGA, <0.000000,0.000000,0.000000>, PSYS_SRC_BURST_SPEED_MIN, 0.1, PSYS_SRC_BURST_SPEED_MAX, 1, PSYS_PART_FLAGS, 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK ];
- Assistant
The error you are encountering is caused by using a function called
llLinksetDataDeleteProtectedandllLinksetDataWriteProtected. These functions do not exist in the LSL programming language.To fix the error, you will need to find an alternative way to achieve the functionality you wanted with these functions. You can check the LSL documentation for available functions and determine the best approach for your code.
- Assistant
Apologies for the confusion earlier. Those functions do exist in LSL, but they are not part of the standard LSL library. They are most likely custom functions defined within your script or within a library script that you are using.
To fix the error, make sure that the custom functions
llLinksetDataDeleteProtectedandllLinksetDataWriteProtectedare defined in your script or included as library scripts. If they are defined in a library script, make sure that the library script is correctly included at the beginning of your script using the#includedirective.If you are still having trouble, please provide more information about where these functions are defined or any additional context that might help identify the issue.
- User
...can you modify it to be opensimulator compatile?
- Assistant
Certainly! To make the code compatible with OpenSimulator, you would need to replace the
llLinksetDataDeleteProtectedandllLinksetDataWriteProtectedfunctions with their OpenSimulator equivalents.In OpenSimulator, you can use the
osSetDynamicKeyfunction to store and retrieve data on a per-link basis. Here's an updated version of your code usingosSetDynamicKey:// Replace this line: llLinksetDataDeleteProtected( keyword, DBPASSWORD ); osSetDynamicKey(llGetLinkKey(lLink), keyword, NULL_KEY, DBPASSWORD); // Replace this line: integer r = llLinksetDataWriteProtected( keyword, value, DBPASSWORD ); integer r = osSetDynamicKey(llGetLinkKey(lLink), keyword, (string)value, DBPASSWORD); // Replace this line: string value = llLinksetDataReadProtected( keyword, DBPASSWORD ); string value = osGetDynamicKey(llGetLinkKey(), keyword, DBPASSWORD);Please note that the
osSetDynamicKeyandosGetDynamicKeyfunctions are OpenSimulator-specific and may not work in Second Life or other platforms. Make sure to test your code in an OpenSimulator environment to ensure compatibility.Let me know if you have any further questions or if there's anything else I can assist you with!
- User
what is DBPASSWORD for?
- Assistant
The
DBPASSWORDvariable in your code appears to be used as a password or authentication key for accessing and modifying the stored data using thellLinksetDataDeleteProtectedandllLinksetDataWriteProtected(or their OpenSimulator equivalents).It is common to use a password or authentication mechanism to protect sensitive data or prevent unauthorized access to certain operations. In your code,
DBPASSWORDis likely used to ensure that only authorized entities can delete or modify the data stored using thellLinksetDataDeleteProtectedandllLinksetDataWriteProtectedfunctions.The password provided in
DBPASSWORDshould be kept secure and should only be known to authorized individuals who have permission to access and modify the data. - User
can you write me an optimized version without DBPASSWORD?
- Assistant
Certainly! Here's an optimized version of your code without the need for the
DBPASSWORDvariable:// Constants float PARTICLE_TIME = 10.0; float s_VOLUME = 1.0; string NOTECARD_NAME = "Settings"; string HANDS = "second hand"; integer DIALOG_TIME = 30; // Variables key gDialogUser = NULL_KEY; integer gParticles = TRUE; list gHands = []; vector gHandStep; integer gNoteListLine; list gNoteList; integer gChannel; integer gListener; integer gDialogTimeUp; integer gPlay; // CONSTANTS list t_PARTICLES = [ "9f602fc3-5132-4d92-978b-dcbe9d4ade81", "64597ea8-0501-442d-a607-a2c9867845bc", "a5b153d3-e77d-46e3-b271-270d5000237b", "996c639b-9b59-490d-bf93-5cf562b7e9