Scripting Bugs

  • Search existing bugs before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
llGetDayLength() reports incorrect time when sitting on an object
This is an elusive bug because it doesn't happen with the default 4-hour day length, but it can be reproduced consistently with any other day length. If you put this script into an object: default { state_entry() { llSetTimerEvent(1); } timer() { integer daylength = llGetDayLength(); llOwnerSay((string)daylength); } } (timer event can be more than 1 second if you want it less spammy) 1: Make sure the parcel's day length, as shown in About Land > Environment, is the default 4 hours. 2: Wear the object while standing, you will see that the reported day length will be correct, as shown in About Land > Environment. (14400 seconds = 4 hours) 3: Then sit on an object. The script will still report the correct day length. 4: Change the parcel's day length to any other value while you're still sitting. 5: The script keeps reporting the 4-hour day length. 6: Stand up and the script will report the correct day length, as shown in About Land > Environment. This means for some reason llGetDayLength() keeps reporting the default 4-hour day length when the avatar wearing the script is sitting on an object, no matter what the parcel's day length is set to. I know there is a newer llGetEnvironment() function that can retrieve parcel day length, I tested it and it does not have this issue. However I believe it is less costly to run llGetDayLength() and llGetTimeOfDay() separately every second in a watch than calling llGetEnvironment() and then retrieving the time of day and day length values from the list, so it would be crucial for this function to work correctly under all circumstances.
3
·
tracked
Vehicle fails to reinitialize physics after non-owner replaces vehicle motor script in object owned by another resident
Summary: When editing a vehicle owned by another resident, replacing the script responsible for setting vehicle physics parameters can leave the object in a broken physical state. The object no longer behaves as a vehicle and instead falls/flops as if llSetVehicleType() / vehicle parameters were not applied. This appears to happen specifically (and consistently) when a non-owner with edit rights deletes the existing vehicle motor script and inserts a new version into the object. Resetting scripts does not help to recover from this bad state. The only workaround is for the owner to take the vehicle back into inventory and rez it again. Only then, will the vehicle physics start working correctly. Steps to Reproduce: Have Resident A own a physical vehicle object. Resident B has permission to edit the vehicle. Resident B deletes the existing script responsible for setting the vehicle motor / vehicle physics parameters. Resident B inserts a new version of that script into the vehicle. Reset the script or reset all scripts. Attempt to use the vehicle. Expected: After the script is inserted and reset, the object should become a vehicle again. The vehicle script should be able to initialize the vehicle normally by setting the vehicle type and vehicle parameters, regardless of whether the script was inserted by the object owner or by another resident with edit rights. Actual Result: The object fails to become a vehicle. It behaves like a normal physical object with no vehicle physics applied. It flops/falls instead of responding as a vehicle. Resetting the vehicle script or resetting all scripts does not fix the issue. Other Observations: This only happens when a non-owner editor deletes and inserts the replacement vehicle script. If the object is owned by me, I cannot reproduce the issue. If I give the updated script to the owner and they insert it themselves, the issue does not occur. Once the bad state happens, script resets do not recover it. Re-rezzing the vehicle from inventory restores correct behavior.
4
·
tracked
Load More
→