Script run_time and Bound check errors
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
02-07-2007 10:23
I am getting both of these when I compile the script I am working on. I have looked at what has been posted in the past but I seem to be missing a explanation of what type of things generally cause these errors and the new WiKi says there are no pages on these topic. I want to resolve it my sell but I am at a loss as to where or what to look for. So if someone would be kind enough to point to a discussion that clarifies their causes, I would much appreciate.
MOD
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
02-07-2007 11:32
The new wiki is not complete. Use the old wikis.
Bounds check usually means that you are accessing more or less of something than actually exists. Like you are asking for characters 10 thru 12 of a 5 character string...
Give a more precise example of your problem, and the netmind will give a more specific answer.
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Thanks
02-07-2007 11:50
I have to figure out how to get back to the old wiki, but at least you gave me something to look for. If I can fix, I will be back.
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
This fixed the problem but why?
02-07-2007 12:12
I removed the following section of code and the error stopped, but why?
integer n; for(n=0;n<50;n++){ llMessageLinked(LINK_SET,n,"",NULL_KEY); }
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
02-07-2007 12:35
How many prims are in this LinkSet? If there isn't one numbered 49, this will be a bounds error, I think. (Notice how I always weasel out at the end  The second parameter tells *which* prim to send the message to.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
02-07-2007 12:48
From: Lee Ponzu How many prims are in this LinkSet? If there isn't one numbered 49, this will be a bounds error, I think. (Notice how I always weasel out at the end  The second parameter tells *which* prim to send the message to. The first parameter is the prim number or link constant, parameter 2 is just an integer. How big is the script?
|
|
Elsewhere Essex
Registered User
Join date: 8 Sep 2006
Posts: 50
|
02-07-2007 15:48
bounds check error are usually resutant of using LINK_SET in a highprim object. the script is basicly trying to send the message to too many prims.
that is the general rule, though not always the case.
also sending linked messages too fast or trying to send too many channels to quickly,like channels 0-50 that your using at the speed of a for() loop would definatley cause it.try adding a llSleep(0.2); int here, before or after the message sending,so that the script actually pause for a brief moment between messages.
just a side note/question:what the point of sending an empty link message? does that even generate a linked_message() event?
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Purpose of Linked message
02-08-2007 13:39
The purpose of the message to 50 prims was to tell each to clear a current value, which is why the blank i.e., "" message.
Thanks for the feedback. It helps me better understand what was going wrong.
|
|
Peekay Semyorka
Registered User
Join date: 18 Nov 2006
Posts: 337
|
02-08-2007 14:28
Calling llMessageLinked with LINK_SET sends the message to ALL the prims in the link. Thus there is no need to call it repeatedly (just once is enough.) Your loop actually causes each prim to receive the message 50 times.
-peekay
|