Jump to content

Holly Bracket Mess Batman {}{}{}{{{}}{}{}{}````


2toe Bigboots
 Share

You are about to reply to a thread that has been inactive for 4691 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Okay so this might be messy ive tryed to fix it up a bit but still cant get it right keep getting error. I've even used LSL editor got it down to one error    1  }  expected   Line28    char 10    I have placed the    } and still same error so hook me up woth a answere please.

//start_unprocessed_text
string NOTECARD_NAME = "userKeys";
string MESSAGE;


key kQuery;
integer iLine = 0;
default {
 
    state_entry() 
    {
         MESSAGE = llGetRegionName() + " " + (string)llGetPos(); 
    }
    
    changed(integer change) 
    {
        
        kQuery = llGetNotecardLine(NOTECARD_NAME, iLine);
    }
 
    dataserver(key query_id, string data) {

	if (query_id == kQuery) {
		if (data == EOF) {

			llResetScript(); }

		 else }
			state_exit()
			{
				llGetFreeMemory();
				llEmail(llGetSubString(data,0,54),"NOTICE",MESSAGE); }
		}

 

Link to comment
Share on other sites

//start_unprocessed_textstring NOTECARD_NAME = "userKeys";string MESSAGE;key kQuery;integer iLine = 0;default {    state_entry()     {         MESSAGE = llGetRegionName() + " " + (string)llGetPos();     }        changed(integer change)     {        kQuery = llGetNotecardLine(NOTECARD_NAME, iLine);    }     dataserver(key query_id, string data)     {      if (query_id == kQuery)       {         if (data == EOF)            llResetScript();         else          {            //state_exit()              llGetFreeMemory();            llEmail(llGetSubString(data,0,54),"NOTICE",MESSAGE);         }      }//if    }//dataserver}//default

 

I didn't bother running it, but I fixed your syntax at least so you can go from there.



Link to comment
Share on other sites

You have a state - state_exit in the else - you can't have a state inside another state.

if you want a list to be sent, do it after reading the complete nc

//start_unprocessed_textstring NOTECARD_NAME = "userKeys";string MESSAGE;list glItems;key kQuery;integer iLine = 0;default {     state_entry()     {         MESSAGE = llGetRegionName() + " " + (string)llGetPos();     }        changed(integer change)     {                kQuery = llGetNotecardLine(NOTECARD_NAME, iLine = 0);        glItems = [];    }     dataserver(key query_id, string data) {		if (query_id == kQuery) {			if (data == EOF) {				llGetFreeMemory();				llEmail(llGetSubString(data,0,54),"NOTICE",llDumpList2String(glItems, ", ")); 			} else {				glItems += data;				kQuery = llGetNotecardLine(NOTECARD_NAME, ++iLine);			}		}	}}

 is it that you want?

 

ETA:

I took the location information out - it's in the email body by default.

Link to comment
Share on other sites

Looks like the email address it sends to is the first 54 characters in your data string...problem is that emails are all diff lengths outside of SL email address.

 

If you want to send this info to a gmail address or something, you will have to pick out the address a different way.

 

If the email address is on the first line of the notecard, you could add this to the beginning of the dataserver event:

if(email=="") email=data;

 

Set the email variable as a global string variable at the top of the script, and add email="";  in the changed event to clear it before it reads the notecard.

Link to comment
Share on other sites

I made the changes....didn't test it in world tho.  This will use the first line of the notecard for the email address.

 

 

//start_unprocessed_textstring NOTECARD_NAME = "userKeys";string MESSAGE;list glItems;

string email;

 

key kQuery;integer iLine = 0;default { state_entry() { MESSAGE = llGetRegionName() + " " + (string)llGetPos(); } changed(integer change) { email=""; kQuery = llGetNotecardLine(NOTECARD_NAME, iLine = 0); glItems = []; } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data == EOF) { llEmail(email,"NOTICE",llDumpList2String(glItems, ", ")); } else {

if(email=="") email=data;

else {

glItems += data; kQuery = llGetNotecardLine(NOTECARD_NAME, ++iLine);

}

  } } }}



Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4691 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...