Whole new issue...
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 12:09
OK, I haven't the slightest clue what is happening with the script other than I didn't script it right... it compiles and runs, but it is just giving me an infinite loop of Keys string settings_card= "Authorized Users"; list authorized_users = [];
default {
dataserver(key query_id, string data) {
llSay(0, llList2String(authorized_users, 0)); authorized_users = llListInsertList(authorized_users, llCSV2List(llGetNotecardLine(settings_card, 3)), 0);// trying to return a CSV list of authorized users llSay(0,llList2String(authorized_users, 0)); llSay(0,llKey2Name(b));// this is in here just to figure out what the UUIDs are (doesn't return a name or value)
} }
What I am trying to accomplish here is just to populate a list using CSVs from a settings notecard. here is an example card (card is named "Authorized Users"  line0 line1 line2 Artemis Cain, User Name, User Name
I am sure that I am going about this the wrong way, so help of any kind would be greatly appreciated!!! -Artemis
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
06-05-2006 12:33
From: Artemis Cain dataserver(key query_id, string data) {
authorized_users = llListInsertList(authorized_users, llCSV2List(llGetNotecardLine(settings_card, 3)), 0);// trying to return a CSV list of authorized users
}
You have the culprit here. When you call llGetNotecardLine() it triggers dataserver event when the line is received from server. While handling this event, your function makes another llGetNotecardLine() call, which again triggers dataserver event. Which is again handled, and another request for the same line is made. etc and so on. a possible solution: move your llGetNotecardLine() call outside of dataserver event. In the event, replace that line with: authorized_users = llCSV2List( data ); 'data' is variable which holds content of notecard line, as received from server.
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 12:38
the other problem that I am running in to is that it is not returning any data for me... should I be enclosing the data on the notecard in "" ?
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
06-05-2006 12:47
From: Artemis Cain should I be enclosing the data on the notecard in "" ? No, that shouldn't be necessary... how do you verify there's actually nothing returned? if you put something like: llOwnerSay( "line content: " + data ); as the first line in dataserver event, it should tell you content of the line. As long as the notecard in object inventory actually has the line you're trying to read, and there's something in there, that is... o.O
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 12:54
that actually comes back... the problem is that the CSV is not being added to the list
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 12:59
I think I figured it out, I THINK....
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 13:04
OK, it is now getting the data from the card... the only problem is that I am getting multiple entries of the same name in the card.
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
06-05-2006 13:39
solved it.. Just kept banging my head against the wall!!!!
|
|
Alphazero Sugar
Noob Tube
Join date: 24 Mar 2005
Posts: 60
|
06-05-2006 17:08
Gotta love programming... there's always a reason, and it's always that one last forehead through drywall hit away.
|
|
MajorTom Hebert
Registered User
Join date: 13 Oct 2005
Posts: 35
|
Way Too True
06-05-2006 17:55
From: Alphazero Sugar Gotta love programming... there's always a reason, and it's always that one last forehead through drywall hit away. That statement is just too true. Lot's of bandages stored next to my computer for this very reason lol.
|