|
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
|
01-29-2008 17:48
Heres the thing: I am trying to build a DJ stage for a party and wanted a master control set up and here's the part of the code thats acting up: list allowed = []; string userCard = "users"; integer uCLine = 0; integer lines; vector txtColor = <1,1,0>; key ucQuery; key ucLines; string url = ""; default { state_entry() { allowed = [llKey2Name(llGetOwner())]; chan = (integer)llFrand(1000) + 100; ucLines = llGetNumberOfNotecardLines(userCard); } dataserver(key query_id, string data) { if(query_id == ucLines) { lines = (integer)data; ucQuery = llGetNotecardLine(userCard, uCLine); } if (query_id == ucQuery) { if (data != EOF) { if(llGetSubString(data, 0,0) != "#") { if(llGetSubString(data,0,2) == "url") { if(url != "") { return; } else { url = llDeleteSubString(data, 0, 3); llOwnerSay(url); } } if(llGetSubString(data, 0,3) == "user") { allowed = llListInsertList(allowed, [llDeleteSubString(data, 0,4)], -1); } } uCLine++; integer pct; pct = uCLine % lines * 10; llSetText((string)((integer)pct) + "%", txtColor, 1.0); ucQuery = llGetNotecardLine(userCard, uCLine); } if(data == EOF) { llSetText("Done", txtColor, 1.0); llOwnerSay(llList2CSV(allowed)); llSleep(1); llSetText("", txtColor, 1.0); } } } //code to do other stuff (not involved with this code
The error I am getting is that on my 14 line notecard I am getting that it is 140% done! WHAT? This is really confusing to me could someone tell me where I Screwed up?
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-29-2008 18:21
Need to declare "integer chan" up in the global variables if you are going to use it somewhere else besides state_entry
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
|
01-29-2008 18:24
From: Jesse Barnett Need to declare "integer chan" up in the global variables if you are going to use it somewhere else besides state_entry it is...this is the part of the code thats acting up the rest works fine
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-29-2008 18:28
From: MCM Villiers it is...this is the part of the code thats acting up the rest works fine Yep I caught it after I posted it. Actually just grabbed the code and ran it through lslint before actually reading it was related to reading the notecard 
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
|
01-29-2008 19:08
It seems to work now...moved to a diffrent sim 
|