Advertisement
347Online

Pastebin Interaction

Sep 19th, 2014 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Create Event
  2. globalvar userkey;
  3. userkey = "";
  4. request_login = -1;
  5.  
  6. //When you Log In
  7. var user, pass;
  8. user = get_string("Username:","");
  9. pass = get_string("Password:","");
  10. request_login = pastebin_login(user,pass);
  11.  
  12. //Async HTTP Event
  13. if (ds_map_find_value(async_load,"status") == 0)
  14.     {
  15.     var type, result;
  16.     type = ds_map_find_value(async_load,"id");
  17.     result = ds_map_find_value(async_load,"result");
  18.     if (string_count("Bad API request",result) >= 1)
  19.         {
  20.         show_message(result);
  21.         }
  22.     else
  23.         {
  24.         switch (type)
  25.             {
  26.             case request_login:
  27.                 userkey = result;
  28.             break;
  29.             }
  30.         }
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement