Jump to content

Prim/script oddity


You are about to reply to a thread that has been inactive for 753 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

While writing a script in a prim today, I came across a real oddity that, in 16 years of building/scripting, I don't recall ever having seen before.

The script I was working on compiled ok, so it contained no errors. The script ran ok because it changed the color of a side exactly as it should do when 'touched'. But outputs from the script/prim suddenly failed to work. Opening a menu (dialog) failed to work. llSay(0,"Ready"); after a reset failed to work, and yet, apart from such outputs, the script worked fine. Nothing would come out of it.

Resetting the script didn't help. I even copied the script's code into a new script, and deleted the old one, but that didn't improve matters. I checked the prim's editable parameters but there's nothing there that could cause it. I even relogged, just in case. I got it working again by rezzing a new prim and putting copies of the scripts into it. Then all was well. After I'd done that, I rerezzed the original prim with its scripts and, lo and behold, it worked just fine.

What on earth caused that? It's very much like a property of the prim that can't be manipulated in the Edit box - like a sit target. But what property could prevent the prim or script from outputting anything?

 

Edited by Phil Deakins
  • Like 1
Link to comment
Share on other sites

When I don't see chat output from something I am working on, nine times out of ten it turns out that I am standing just outside chat range. That can happen easily if I have been rezzing a bunch of things to decorate an area, using my cam to focus on each one instead of moving my avatar around.   As the note in the wiki says, "The position where the chat is generated is where the root prim of the dialog generating object was when the dialog button was pressed," so you can be outside of chat range without realizing it.

Edited by Rolig Loon
Additional information
Link to comment
Share on other sites

I've seen similar oddities (it's been awhile though, I don't have my mainland region anymore).  My guess at the time was, the script was competing for resources on the region.

It was just a guess. I should have gone to a low-script region to check. Anyway, the same script used to be fine.

Link to comment
Share on other sites

31 minutes ago, Phil Deakins said:

Also, the menu (dialog) wouldn't open, and that isn't distance related.

Ah, I missed that part of your note. Yeah, even if you are halfway across the region you should still see the dialog menu.  That's a puzzle.  It's tempting to suggest that the script was somehow set to "Not Running", but you did say that it did other things.  Grasping at straws here, I notice that you didn't say whether it still did other things after you tried to use the dialog menu.  So, it's possible that the script somehow hung up as soon as you opened the dialog -- got caught in a loop somewhere or lost its communication channel.  I've had that happen too. If I write a script that involves changing states or one that deliberately turns a channel on and off, I can accidentally forget to re-open a comm channel.

Link to comment
Share on other sites

Thank you, both.

Scripts competing is never an issue in the sim. Yes, it still did other things, such as turn a face green when touched, and back to red when touched again. Incidentally, this script doesn't change state, and the channel it was written to llSay() on was 0. In fact, it was test line that I put in because nothing was coming out of it.

I'll have to put it down to ghosts lol. Well, at least a mystery. It really did appear to have acquired a property to not output anything to the outside world. A copy and paste of the script into a new script in a new prim works just fine with nothing changed. And even deleting and rerezzing the original prim with the script inside caused it to function properly again.

I don't think we can get to the bottom of it, so thank you both once again.

  • Sad 1
Link to comment
Share on other sites

@rasterscan

It was ok after I'd copied the script code to a new script in a new prim, rasterscan. The original script/prim worked fine after I'd rerezzed it, but I haven't checked it again.

When trying to figure what was happening, I'd copied the script content into a new script in the same original prim, but it still didn't work, so it could be that the prim itself had acquired some weird property that was causing it. Whatever it was, it disappeared after deleting the object and rezzing it again, but I've been using the new prim and script since then and it hasn't happened again.

Edited by Phil Deakins
  • Like 1
Link to comment
Share on other sites

Just the other day a scripting friend IM'd me to complain about a problem where their script set itself to not running (no-mono) a few times, but magically sorted itself out after a bit. Just for fun I tried making a purposefully broken script that would break in the way they described, but no luck. Maybe "blue moon"s are getting a bit more frequent?

Link to comment
Share on other sites

Though I haven't had this particular problem, I've had similar weirdness over the last 14 years. I've had objects fail to texture until I've deleted and re-rezzed them. I've had target omega and particle emitters fail until doing the same. Unless the problem persists though take/delete across time and regions , I just chalk it up to SL being SL.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 753 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...