Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // and the old man said
- // WELCOME TO THE JUNGLE BABY
- integer debugging = TRUE;
- string gWhiteListNote = "#whitelist";
- string gBlackListNote = "#blacklist";
- string gAttackListNote = "#attack";
- string gDefenseListNote = "#defense";
- integer gUpdateCtrl = -1;
- list gNoteList;
- integer gNotesTotal;
- //funcs
- debug(string message) {
- if(debugging) llSay(0, "/me ~debug _ "+message);
- }
- system_update(integer type, integer num) {
- if(type == 0) {
- debug("started update for gNoteList, first note is "+llList2String(gNoteList,0));
- gUpdateCtrl = 0;
- llGetNumberOfNotecardLines(llList2String(gNoteList,0));
- }
- else if(type == 1) {
- gNoteList+=num;
- }
- }
- default {
- state_entry() {
- gNoteList = [gAttackListNote, gBlackListNote, gDefenseListNote, gWhiteListNote, "#test"];
- gNotesTotal = llGetListLength(gNoteList);
- system_update(0,0);
- }
- dataserver(key qid, string data) {
- debug("current gUpdateCtrl "+(string)gUpdateCtrl+" Data called!, our data is "+data+", and our current not we are on is "+llList2String(gNoteList,gUpdateCtrl)+" QID="+(string)qid);
- if(gUpdateCtrl == -1) return; //don't have any other sorts of data requests yet
- else if(gUpdateCtrl >= 0) { //:3 by doing this I think it will be easier to add in another update type n' shit
- system_update(1, (integer)data);
- if((gNotesTotal-1) == gUpdateCtrl) { //need to get out of this loop when we have all notes listed
- gUpdateCtrl = -1;
- debug("FINAL NOTES LIST, should be "+(string)gNotesTotal+" strings and "+(string)gNotesTotal+" numbers");
- debug(llList2CSV(gNoteList));
- }
- else {
- llGetNumberOfNotecardLines(llList2String(gNoteList, gUpdateCtrl));
- gUpdateCtrl += 1;
- }
- }
- }
- }
- [17:04] Pixel Tool 2.0 ~debug _ started update for gNoteList, first note is #attack
- [17:04] Pixel Tool 2.0 ~debug _ current gUpdateCtrl 0 Data called!, our data is 1, and our current not we are on is #attack QID=58885cdc-0623-d86f-eb35-6bed7837a89e
- [17:04] Pixel Tool 2.0 ~debug _ current gUpdateCtrl 1 Data called!, our data is 1, and our current not we are on is #blacklist QID=3ba29372-bfde-7b56-5a24-98a96f330508
- [17:04] Pixel Tool 2.0 ~debug _ current gUpdateCtrl 2 Data called!, our data is 2, and our current not we are on is #defense QID=719f7d3c-1663-8d1c-8e02-ea889b88d090
- [17:04] Pixel Tool 2.0 ~debug _ current gUpdateCtrl 3 Data called!, our data is 3, and our current not we are on is #whitelist QID=e91943c0-9dd5-28d1-59ba-8a6b4abf7cf6
- [17:04] Pixel Tool 2.0 ~debug _ current gUpdateCtrl 4 Data called!, our data is 5, and our current not we are on is #test QID=2e880900-48fc-cac4-1e08-1a18f49f2149
- [17:04] Pixel Tool 2.0 ~debug _ FINAL NOTES LIST, should be 5 strings and 5 numbers
- [17:04] Pixel Tool 2.0 ~debug _ #attack, #blacklist, #defense, #whitelist, #test, 1, 1, 2, 3, 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement