Running this script with two note cards one named settings and another called sequence:
//Datahandling
key kQuery = NULL_KEY;
integer iLine = 0;
string gStrNotecard = "";
list gCard_Lines_Temp;
string owner_display_name;
string owner_name_query;
integer _debug =1;
GetNotecard(string notecard, integer notify) // Get the notecard's name, if present
{
gStrNotecard = "";
iLine = 0;
integer iNoteLine = 0;
kQuery = NULL_KEY;
llOwnerSay("Reading Notecard: " + notecard);
integer intNoteCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Check if there is a notecard to begin with
if (intNoteCount)
if( kQuery == NULL_KEY) llOwnerSay("The Notecard '" + gStrNotecard + "' Could not be read . This could be beacuse of privaliges.");
if(_QueryId == kQuery)
{
if(_data != EOF) {
if ((llGetSubString(_data, 1, 2) || (_data == "")) // Check if the line should be skipped
if(_debug )llOwnerSay("(DEBUG) Line : " + (string)iLine);
++iLine; // Increment the line no.
kQuery = llGetNotecardLine(gStrNotecard ,iLine);
} else
{ if(_debug )llOwnerSay("(DEBUG) End of notecard '" + gStrNotecard "' reached. " (string)iLine + " items read..."); note_card_finished(gStrNotecard); return; // Nothing more to be done; exit the event }
}
}
}
What were you doing when it happened?
No error just will not process card output as follows
[10:59] 2 way Light controller v1.06: Loading System - Retrieving Notecards...
[10:59] 2 way Light controller v1.06: Reading Notecard: Sequence
[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 1, NoteCard Name 'sequence' @ line: 0
[10:59] 2 way Light controller v1.06: Reading Notecard: Settings
[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 2, NoteCard Name 'settings' @ line: 0
[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 28076f83-8b48-65e1-6891-96e81a450442
[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4
[10:59] 2 way Light controller v1.06: (DEBUG) Line : 0
[10:59] 2 way Light controller v1.06: Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869
[10:59] 2 way Light controller v1.06: (DEBUG) Line : 1
What were you expecting to happen instead?
I was expecting it to read the last notecard and read first note card too. Despite using the same code kQuery = llGetNotecardLine(notecard ,iLine) the first query with NoteCard Name 'sequence' does not enter the data server at all it rsults in no Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869 or similar.
Other information
Is there an SL bug causing this?
Original Jira Fields
| Field | Value |
| ------------- | ------------- |
| Issue | BUG-227291 |
| Summary | I am having trouble ready first of two note cards |
| Type | Bug |
| Priority | Unset |
| Status | Closed |
| Resolution | Not Applicable |
| Labels | notecard, dataserver |
| Reporter | VirtualKitten (virtualkitten) |
| Created at | 2019-07-04T18:12:14Z |
| Updated at | 2019-07-04T18:47:34Z |
```
{
'Build Id': 'unset',
'Business Unit': ['Platform'],
"Is there anything you'd like to add?": 'Is there an SL bug causing this?',
'ReOpened Count': 0.0,
'Severity': 'Unset',
'Target Viewer Version': 'viewer-development',
'What just happened?': 'Running this script with two note cards one named settings and another called sequence:\r\n\r\n\r\n//Datahandling\r\nkey kQuery = NULL_KEY;\r\ninteger iLine = 0;\r\nstring gStrNotecard = "";\r\nlist gCard_Lines_Temp;\r\nstring owner_display_name;\r\nstring owner_name_query;\r\n\r\ninteger _debug =1;\r\n \r\nGetNotecard(string notecard, integer notify) // Get the notecard\'s name, if present\r\n{\r\n \r\n \r\n gStrNotecard = "";\r\n iLine = 0;\r\n integer iNoteLine = 0;\r\n llOwnerSay("Reading Notecard: " + notecard);\r\n integer intNoteCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Check if there is a notecard to begin with\r\n if (intNoteCount)\r\n { \r\n \r\n iNoteLine=-1;\r\n do\r\n gStrNotecard = llGetInventoryName(INVENTORY_NOTECARD, iNoteLine ++);\r\n while((gStrNotecard != notecard) && iNoteLine <= intNoteCount);\r\n if(_debug) llOwnerSay("(DEBUG) Line Count "+ (string)iNoteLine + ", NoteCard Name \'" + gStrNotecard + "\' @ line: "+(string)iLine);\r\n \r\n \r\n kQuery = llGetNotecardLine(notecard ,iLine);\r\n \r\n \r\n } else llOwnerSay("NOTECARD NOT FOUND: " + notecard); \r\n \r\n}\r\ndefault\r\n{\r\n \r\n state_entry()\r\n {\r\n llOwnerSay("Loading System - Retrieving Notecards...");\r\n GetNotecard("Sequence", TRUE);\r\n GetNotecard("Settings", TRUE);\r\n \r\n \r\n }\r\n dataserver(key _QueryId, string _data)\r\n {\r\n if(_QueryId == owner_name_query ) {\r\n // if(_debug) llOwnerSay(response);\r\n owner_display_name = _data;\r\n }\r\n if( kQuery == NULL_KEY) llOwnerSay("The Notecard \'" + gStrNotecard + "\' Could not be read . This could be beacuse of privaliges.");\r\n if(_QueryId == kQuery)\r\n {\r\n \r\n if(_data != EOF) {\r\n if ((llGetSubString(_data, 1, 2) != "!#") || (_data == "")) // Check if the line should be skipped\r\n {\r\n integer hashIndex = llSubStringIndex(_data,"#")+1;\r\n integer length = llStringLength(_data)-1;\r\n gCard_Lines_Temp += llGetSubString(_data,hashIndex,length);\r\n }\r\n if(_debug )llOwnerSay("(DEBUG) Line : " + (string)iLine);\r\n ++iLine; // Increment the line no.\r\n kQuery = llGetNotecardLine(gStrNotecard ,iLine);\r\n \r\n } else {\r\n if(_debug )llOwnerSay("(DEBUG) End of notecard \'" + gStrNotecard +"\' reached. "+ (string)iLine + " items read...");\r\n note_card_finished(gStrNotecard);\r\n return; // Nothing more to be done; exit the event\r\n \r\n }\r\n }\r\n \r\n }\r\n \r\n}',
'What were you doing when it happened?': "No error just will not process card output as follows\r\n\r\n[10:59] 2 way Light controller v1.06: Loading System - Retrieving Notecards...\r\n[10:59] 2 way Light controller v1.06: Reading Notecard: Sequence\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 1, NoteCard Name 'Sequence' @ line: 0\r\n[10:59] 2 way Light controller v1.06: Reading Notecard: Settings\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 2, NoteCard Name 'Settings' @ line: 0\r\n[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 28076f83-8b48-65e1-6891-96e81a450442\r\n[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line : 0\r\n[10:59] 2 way Light controller v1.06: Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line : 1",
'What were you expecting to happen instead?': 'I was expecting it toIt read the last notecard read first note card',
}
```
What just happened?
Running this script with two note cards one named settings and another called sequence:
//Datahandling key kQuery = NULL_KEY; integer iLine = 0; string gStrNotecard = ""; list gCard_Lines_Temp; string owner_display_name; string owner_name_query;
integer _debug =1;
GetNotecard(string notecard, integer notify) // Get the notecard's name, if present {
gStrNotecard = ""; iLine = 0; integer iNoteLine = 0;
kQuery = NULL_KEY; llOwnerSay("Reading Notecard: " + notecard); integer intNoteCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Check if there is a notecard to begin with if (intNoteCount)
{ iNoteLine=-1; do gStrNotecard = llGetInventoryName(INVENTORY_NOTECARD, iNoteLine +); while((gStrNotecard != notecard) && iNoteLine <= intNoteCount); if(_debug) llOwnerSay("(DEBUG) Line Count " (string)iNoteLine + ", NoteCard Name '" + gStrNotecard + "' @ line: "+(string)iLine); kQuery = llGetNotecardLine(notecard ,iLine); }
else llOwnerSay("NOTECARD NOT FOUND: " + notecard);
} default {
state_entry()
{ llOwnerSay("Loading System - Retrieving Notecards..."); GetNotecard("Sequence", TRUE); GetNotecard("Settings", TRUE); }
dataserver(key _QueryId, string _data) { if(_QueryId == owner_name_query )
{ // if(_debug) llOwnerSay(response); owner_display_name = _data; }
if( kQuery == NULL_KEY) llOwnerSay("The Notecard '" + gStrNotecard + "' Could not be read . This could be beacuse of privaliges."); if(_QueryId == kQuery) {
if(_data != EOF) { if ((llGetSubString(_data, 1, 2) || (_data == "")) // Check if the line should be skipped
{ integer hashIndex = llSubStringIndex(_data,"#")+1; integer length = llStringLength(_data)-1; gCard_Lines_Temp += llGetSubString(_data,hashIndex,length); }
if(_debug )llOwnerSay("(DEBUG) Line : " + (string)iLine); ++iLine; // Increment the line no. kQuery = llGetNotecardLine(gStrNotecard ,iLine);
} else
{ if(_debug )llOwnerSay("(DEBUG) End of notecard '" + gStrNotecard "' reached. " (string)iLine + " items read..."); note_card_finished(gStrNotecard); return; // Nothing more to be done; exit the event }
}
}
}
What were you doing when it happened?
No error just will not process card output as follows
[10:59] 2 way Light controller v1.06: Loading System - Retrieving Notecards... [10:59] 2 way Light controller v1.06: Reading Notecard: Sequence [10:59] 2 way Light controller v1.06: (DEBUG) Line Count 1, NoteCard Name 'sequence' @ line: 0 [10:59] 2 way Light controller v1.06: Reading Notecard: Settings [10:59] 2 way Light controller v1.06: (DEBUG) Line Count 2, NoteCard Name 'settings' @ line: 0 [10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 28076f83-8b48-65e1-6891-96e81a450442 [10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 [10:59] 2 way Light controller v1.06: (DEBUG) Line : 0 [10:59] 2 way Light controller v1.06: Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869 [10:59] 2 way Light controller v1.06: (DEBUG) Line : 1
What were you expecting to happen instead?
I was expecting it to read the last notecard and read first note card too. Despite using the same code kQuery = llGetNotecardLine(notecard ,iLine) the first query with NoteCard Name 'sequence' does not enter the data server at all it rsults in no Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869 or similar.
Other information
Is there an SL bug causing this?
Original Jira Fields
| Field | Value | | ------------- | ------------- | | Issue | BUG-227291 | | Summary | I am having trouble ready first of two note cards | | Type | Bug | | Priority | Unset | | Status | Closed | | Resolution | Not Applicable | | Labels | notecard, dataserver | | Reporter | VirtualKitten (virtualkitten) | | Created at | 2019-07-04T18:12:14Z | | Updated at | 2019-07-04T18:47:34Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], "Is there anything you'd like to add?": 'Is there an SL bug causing this?', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'Running this script with two note cards one named settings and another called sequence:\r\n\r\n\r\n//Datahandling\r\nkey kQuery = NULL_KEY;\r\ninteger iLine = 0;\r\nstring gStrNotecard = "";\r\nlist gCard_Lines_Temp;\r\nstring owner_display_name;\r\nstring owner_name_query;\r\n\r\ninteger _debug =1;\r\n \r\nGetNotecard(string notecard, integer notify) // Get the notecard\'s name, if present\r\n{\r\n \r\n \r\n gStrNotecard = "";\r\n iLine = 0;\r\n integer iNoteLine = 0;\r\n llOwnerSay("Reading Notecard: " + notecard);\r\n integer intNoteCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Check if there is a notecard to begin with\r\n if (intNoteCount)\r\n { \r\n \r\n iNoteLine=-1;\r\n do\r\n gStrNotecard = llGetInventoryName(INVENTORY_NOTECARD, iNoteLine ++);\r\n while((gStrNotecard != notecard) && iNoteLine <= intNoteCount);\r\n if(_debug) llOwnerSay("(DEBUG) Line Count "+ (string)iNoteLine + ", NoteCard Name \'" + gStrNotecard + "\' @ line: "+(string)iLine);\r\n \r\n \r\n kQuery = llGetNotecardLine(notecard ,iLine);\r\n \r\n \r\n } else llOwnerSay("NOTECARD NOT FOUND: " + notecard); \r\n \r\n}\r\ndefault\r\n{\r\n \r\n state_entry()\r\n {\r\n llOwnerSay("Loading System - Retrieving Notecards...");\r\n GetNotecard("Sequence", TRUE);\r\n GetNotecard("Settings", TRUE);\r\n \r\n \r\n }\r\n dataserver(key _QueryId, string _data)\r\n {\r\n if(_QueryId == owner_name_query ) {\r\n // if(_debug) llOwnerSay(response);\r\n owner_display_name = _data;\r\n }\r\n if( kQuery == NULL_KEY) llOwnerSay("The Notecard \'" + gStrNotecard + "\' Could not be read . This could be beacuse of privaliges.");\r\n if(_QueryId == kQuery)\r\n {\r\n \r\n if(_data != EOF) {\r\n if ((llGetSubString(_data, 1, 2) != "!#") || (_data == "")) // Check if the line should be skipped\r\n {\r\n integer hashIndex = llSubStringIndex(_data,"#")+1;\r\n integer length = llStringLength(_data)-1;\r\n gCard_Lines_Temp += llGetSubString(_data,hashIndex,length);\r\n }\r\n if(_debug )llOwnerSay("(DEBUG) Line : " + (string)iLine);\r\n ++iLine; // Increment the line no.\r\n kQuery = llGetNotecardLine(gStrNotecard ,iLine);\r\n \r\n } else {\r\n if(_debug )llOwnerSay("(DEBUG) End of notecard \'" + gStrNotecard +"\' reached. "+ (string)iLine + " items read...");\r\n note_card_finished(gStrNotecard);\r\n return; // Nothing more to be done; exit the event\r\n \r\n }\r\n }\r\n \r\n }\r\n \r\n}', 'What were you doing when it happened?': "No error just will not process card output as follows\r\n\r\n[10:59] 2 way Light controller v1.06: Loading System - Retrieving Notecards...\r\n[10:59] 2 way Light controller v1.06: Reading Notecard: Sequence\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 1, NoteCard Name 'Sequence' @ line: 0\r\n[10:59] 2 way Light controller v1.06: Reading Notecard: Settings\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line Count 2, NoteCard Name 'Settings' @ line: 0\r\n[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 28076f83-8b48-65e1-6891-96e81a450442\r\n[10:59] 2 way Light controller v1.06: Key 1 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4 , Key 2 ec2e0b6d-272c-9bbc-97db-e4ba41b8eec4\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line : 0\r\n[10:59] 2 way Light controller v1.06: Key 1 c9fd944c-bd39-48a9-d456-49b2129e3869 , Key 2 c9fd944c-bd39-48a9-d456-49b2129e3869\r\n[10:59] 2 way Light controller v1.06: (DEBUG) Line : 1", 'What were you expecting to happen instead?': 'I was expecting it toIt read the last notecard read first note card', } ```