Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object_Rez fails

Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
12-01-2009 03:27
Object rezz fails to work on my land(silent error), using the example code.

Yet it works in the sandbox? Oo
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
12-01-2009 03:36
There are a couple of possible explanations in the caveats for llRezObject silent failures at http://wiki.secondlife.com/wiki/LlRezObject#Caveats that might have a bearing on your problem.
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
12-01-2009 04:32
Sorry I ment "object_rez"
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-01-2009 05:51
Do you mean, it fails to trigger after calling llRezObject()?
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
12-01-2009 07:12
Well the items never link, so I guess so.

It wont work on my land, but works perfectly at a sandbox I use.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-01-2009 08:49
From: Nyx Alsop
Well the items never link, so I guess so.

It wont work on my land, but works perfectly at a sandbox I use.
Don't guess, test. Put an llSay() in the on_rez().

I assume the object rezzes or you'd have mentioned that.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
12-01-2009 08:59
From: Lear Cale
Don't guess, test. Put an llSay() in the on_rez().

/me points! This!!!

When I start any non-trivial script, I stuff this at the top right away:

Debug(string text)
{
llOwnerSay (text);
}

Efficient? Not really.. Life saver? Oh yeah.. Just a Debug ("on_rez got called!";); or whatever has saved me from chassing my prim tail many, many times..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-01-2009 09:09
For complex script sets, I often use this:

integer DebugMask;

debug(integer level, string str) {
if (level & DebugMask) {
llOwnerSay(llGetScriptName() + ": " + str);
}
}

Later, in the code:

debug(1, "doing this";);
...
debug(1, "doing that";);
...
debug(2, "sent or got some message";);
...
debug(4, "new user";);

etc, using a different power of two for different categories of debugs, usually using 1 for the most frequent stuff and higher numbers for higher level things. Setting DebugMask to -1 turns on all debugs.

DebugMask gets set usually by notecard, but can be hard coded or whatever.

This makes it easy to debug a number of different kinds of problems, and easy to remove at any time to save time or space.
Indeterminate Schism
Registered User
Join date: 24 May 2008
Posts: 236
12-02-2009 03:44
Nyx - this is meant to be friendly advice so if it sounds rude or mean it's just my failure to communicate properly. Apologies and please don't be upset or offended:

You've created a lot of threads in the past few weeks almost asking for step-by-step help. Most of your questions have been good ones, individually, and with luck the answers will also help other people facing the same issues. No problem with what you're asking then! :-) As soon as you hit a problem you seem to write it up though, without checking yourself and the documentation first :-(

Programming, and 'scripting' is just LL's way of making it sound friendlier, is ALL about debugging. Write, test, debug. Write, test, debug. Write, test, debug. And then debug again because the third time around wrecked something in the first. Now that broke the second. Start again taking all things into account. Write, test, debug. Two steps forward and, hopefully, only one step back. Then it won't work on the second Tuesday of every third month, even though you're not doing anything date-related. Don't even get me started on what happens when you give it to someone else for the first time ... etc.

In RL we write, for instance, web-sites that are wonderful, interactive, dynamic, efficient, attractive and fast .... honest ... right up until someone else tries to use it. From a different browser. On a Windows/Mac/Linux box. With the wrong drivers. And it goes on, and on, and on.

Testing, debugging and PATIENCE. Patience with yourself as much as what you're trying to do. You're not stupid, your progress and meaningful questions show that. You can do this. Test everything, check everything, read everything. And then do it again. And then ask :-) Yes, it can be very frustrating, especially when the problem turns out to be one of those 'undocumented features' scattered throughout LSL, but trust yourself. You are as capable at most of this as any of us, or will be with practice.