Difference between revisions of "Talk:LlGetNotecardLine"
Line 20: | Line 20: | ||
Whimper. Counter 5 gives line 6. But (this is why I whimper) linecount-1 did give line 5 not line 6 as you would imagine. I changed the script a few times since that wasn't working and can't remember exactly how it was. I think it might be best to put this down to scripter error and move on. Sorry. If there are 6 lines the last line is at index 5. But somehow(I will pay more attention in future) linecount-1 returned as if indexing started at 1 not o. -- '''[[User:EddyFragment Robonaught|Eddy]]''' 18:31, 24 May 2009 (UTC) | Whimper. Counter 5 gives line 6. But (this is why I whimper) linecount-1 did give line 5 not line 6 as you would imagine. I changed the script a few times since that wasn't working and can't remember exactly how it was. I think it might be best to put this down to scripter error and move on. Sorry. If there are 6 lines the last line is at index 5. But somehow(I will pay more attention in future) linecount-1 returned as if indexing started at 1 not o. -- '''[[User:EddyFragment Robonaught|Eddy]]''' 18:31, 24 May 2009 (UTC) | ||
Do you think it's worth mentioning in caveats that if there is no info on a line it is not counted as a line? ie. | |||
<pre>1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6</pre> | |||
is still 6 lines and not 7. -- '''[[User:EddyFragment Robonaught|Eddy]]''' 18:53, 24 May 2009 (UTC) |
Revision as of 10:53, 24 May 2009
Check validity of: "If the return is a NULL_KEY then notecard could not be found in inventory???". Check what happens if permissions are not present.
- I've checked it and it never return a NULL_KEY. Strife Onizuka 21:29, 16 April 2007 (PDT)
Does not support negative indexes
But....The first line is index "0" and strangely the last line is numbered as if the first line was "1".
Eg. llGetNumberOfNotecardLines() returns 6. Thus with line 0 being the first line , line 5 should be the last but this is not the case. Line 6 is the correct index for the last line. ???? -- Eddy 16:54, 24 May 2009 (UTC)
So if you had a notecard...
1 2 3 4 5 6
What is the value of associated with llGetNumberOfNotecardLines(notecard, 6)? Is the value "6" or EOF? -- Strife (talk|contribs) 17:40, 24 May 2009 (UTC)
Testing now. The reason I cannot say outright is that I have an if(data == EOF) change value of counter set up and am presently confused. However (it may take a little while to rebuild a test script(remember I am noob)) I set the counter to allow for the "0" index offset and it went to index-1 literal rather than the last index which was 6 in this case. So counter set to num_of_lines-1 returned 5 not 6. (I will remember to sign one day) -- Eddy 17:59, 24 May 2009 (UTC)
Whimper. Counter 5 gives line 6. But (this is why I whimper) linecount-1 did give line 5 not line 6 as you would imagine. I changed the script a few times since that wasn't working and can't remember exactly how it was. I think it might be best to put this down to scripter error and move on. Sorry. If there are 6 lines the last line is at index 5. But somehow(I will pay more attention in future) linecount-1 returned as if indexing started at 1 not o. -- Eddy 18:31, 24 May 2009 (UTC)
Do you think it's worth mentioning in caveats that if there is no info on a line it is not counted as a line? ie.
1 2 3 4 5 6
is still 6 lines and not 7. -- Eddy 18:53, 24 May 2009 (UTC)