SHARE
TWEET

Untitled

a guest Mar 2nd, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. String Logic, Turns commands that are
  3. separated by spaces in to usable strings
  4. */
  5. var st = 1;
  6. var ed = 0;
  7. var p = 0;
  8. var chk = false;
  9. keyboard_string = string(keyboard_string + " ");
  10. for(var o = 0; o < 10; o++){
  11.     exec[o] = "";
  12. }
  13. for(var i = 1; i <= string_length(keyboard_string); i++){
  14.     if string_char_at(keyboard_string, i) == " " && string_char_at(keyboard_string, i -1) != " "{
  15.         chk = true;
  16.     }
  17.     if chk == true{
  18.         chk = false;
  19.         while string_char_at(keyboard_string, st) == " "{
  20.             st++;
  21.             ed--;
  22.         }
  23.         exec[p] = string_copy(keyboard_string, st, ed);
  24.         p++;
  25.         i++;
  26.         st = i;
  27.         ed = 0;
  28.     }
  29.     ed++;
  30. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top