Sleeper Guillaume
Explorer Achiever
Join date: 8 Jan 2003
Posts: 120
|
01-27-2003 11:18
I gave a copy of this script to Grid Linden. I had a few short lists and was trying out the list routines. I crashed the sim while playing with a tiny list of lists. Lists of tuples are not specifically mentioned in the lsl2 reference, but at the time I was thinking they should work.
I also have another script where a for-loop won't run unless an llWhisper() call is placed before it. Very strange. I have a copy of that, if I should give that one to someone as well.
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
01-28-2003 01:48
i ran into the for loop problem with my lost and found script, where the whole thing wouldn't run unless there was some chat call in the loop. It was a huge scripte, switching between 5 states... so that might have been it. As to the list of lists...I thought that when you added lists together, it merely made one larger list, gonna have to look at the documentation for that though. btw, there is a way to make kind of an array...if you put vectors in it, well then you can have an nx3(columnsXrows, right?). I was using it to maunally sort a list, where the x coordinate was the integer value of the objects that had been sensed, and the z value was the distance from the current location.
_____________________
i've got nothing. 
|
Shebang Sunshine
Royal PITA
Join date: 3 Dec 2002
Posts: 765
|
Re: Small script crashes sim trying out list functions.
01-28-2003 05:55
From: someone Originally posted by Sleeper Guillaume I gave a copy of this script to Grid Linden. I had a few short lists and was trying out the list routines. I crashed the sim while playing with a tiny list of lists. Lists of tuples are not specifically mentioned in the lsl2 reference, but at the time I was thinking they should work.
I also have another script where a for-loop won't run unless an llWhisper() call is placed before it. Very strange. I have a copy of that, if I should give that one to someone as well. My CD player script has a for loop that won't run unless there's an llWhisper inside it. The for loop adds inventory items into a list. I didn't try putting a whisper directly before the start of the for loop. This is the script I posted about yesterday -- then in world last night I got it working --- sometimes. Sometimes it spits out error messages after adding the 4th Inventory item (or 3rd, depending on how you look at it). It might have crashed a sim a couple of times; still not sure on that. James does have a copy of the script. And after all that, I still didn't remember to copy the script and save it to my system. Heh. #!
|
Sleeper Guillaume
Explorer Achiever
Join date: 8 Jan 2003
Posts: 120
|
01-28-2003 08:35
Well, yes, when you add a list to a list it appends them.
|
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
|
01-30-2003 14:32
If you have a simple (not a 6-state, 200-line monster) script with a for-loop that doesn't execute without an llWhisper() or llSay() then it would be great if you could post a copy on this thread so the developers can test it and track down the problem. Or you could give it to Cory Linden or Pheonix Linden if you find them in-world.
Meanwhile, I'll try to reproduce the problem next time I get a chance.
|
Shebang Sunshine
Royal PITA
Join date: 3 Dec 2002
Posts: 765
|
01-30-2003 18:55
Ok, this does not crash the sim (to the best of my knowledge). Sometimes it works properly, other times it doesn't.
list theSongs; integer j; integer count = llGetInventoryNumber(INVENTORY_SOUND);
for (j = 0; j < count; j++) { string sound_name = llGetInventoryName(INVENTORY_SOUND, j); llPreloadSound(sound_name); string line = " loaded " + sound_name + " " + (string)j; theSongs = sound_name + theSongs; //llWhisper(0,line); }
That's all in state_entry
With the llWhisper commented out, I get the following:
scripted tp cd v2: Script run-time error scripted tp cd v2: Bounds Check Error
With llWhisper uncommented, I'll get back the first 3-4 lines (loaded song_name #), followed by the above two error messages ---- most of the time. Occasionally it will load all the sounds in inventory (just under 20 right now).
#!
_____________________
-- Gravy: the new ice cream.
|