Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string gamChat(string input) {
- integer len = llStringLength(input); //Find out how long our string is
- integer oe = 1; // Initialize some variables, this one will check if we're on odd or even
- integer loc = 0; // And this one will be our location for llGetSubString, starting at 0.
- string miracles; // This will be the result
- while ( loc < len ) // So as long as we're not at the end of the string..
- {
- string work = llGetSubString(input, loc, loc); //A string is created with the letter at loc in the input
- string letter = llGetSubString(input, loc, loc);
- if ( oe == 1 ) // Is this a letter or an OTHER letter?
- {
- work = llToUpper(work); // Make it uppercase!
- miracles + work; // Take our letter and stick it on the end of the result.
- loc++; //We're done with this letter, increment our location number.
- oe = 0; // And flip the odd/even bit while we're at it.
- llOwnerSay("loc: " + (string)loc + " " + work); //debug crap
- llOwnerSay("len: " + (string)len + " " + work);
- }
- else if ( oe == 0 ) //Bluh bluh same thing again but flipped turnways
- {
- work = llToLower(work);
- miracles + work;
- loc++;
- oe = 1;
- llOwnerSay("loc: " + (string)loc + " " + work);//debug crap
- llOwnerSay("len: " + (string)len + " " + work);
- }
- jump Break;
- }//Why is the loop not ending?!?
- @Break;
- llOwnerSay(miracles);
- return (string)miracles;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement