Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string gamChat(string input) {
  2.     integer len = llStringLength(input); //Find out how long our string is
  3.     integer oe = 1; // Initialize some variables, this one will check if we're on odd or even
  4.     integer loc = 0; // And this one will be our location for llGetSubString, starting at 0.
  5.     string miracles; // This will be the result
  6.     while ( loc < len ) // So as long as we're not at the end of the string..
  7.     {
  8.         string work = llGetSubString(input, loc, loc); //A string is created with the letter at loc in the input
  9.         string letter = llGetSubString(input, loc, loc);
  10.         if ( oe == 1 ) // Is this a letter or an OTHER letter?
  11.         {
  12.             work = llToUpper(work); // Make it uppercase!
  13.             miracles + work; // Take our letter and stick it on the end of the result.
  14.             loc++; //We're done with this letter, increment our location number.
  15.             oe = 0; // And flip the odd/even bit while we're at it.
  16.             llOwnerSay("loc: " + (string)loc + " " + work); //debug crap
  17.             llOwnerSay("len: " + (string)len + " " + work);
  18.         }
  19.         else if ( oe == 0 ) //Bluh bluh same thing again but flipped turnways
  20.         {
  21.             work = llToLower(work);
  22.             miracles + work;
  23.             loc++;
  24.             oe = 1;
  25.             llOwnerSay("loc: " + (string)loc + " " + work);//debug crap
  26.             llOwnerSay("len: " + (string)len + " " + work);
  27.         }
  28.     jump Break;
  29.     }//Why is the loop not ending?!?
  30.     @Break;
  31.     llOwnerSay(miracles);
  32.     return (string)miracles;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement