Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* As of now I have made a Google Sheets with all of the Data I want to incorporate into my game... It is far from ready but I wanted to test out Google Sheets by giving myself a Beginner Starting Pack / HUD... Unfortunately I don't know where to HTTP_METHOD "GET" and "RESPONSE, the following code, aside from my Sheet URL is from what I researched in the Forums.*/
- string sheetID = "18HslQMEJ76qjuPmXg9mjKpL3780_lbjhe3pfk1eeWsIE";
- string sheetURL = "https://docs.google.com/spreadsheets/d/1dTWPi4uHodkcwX1qjdT1ib8M-QJbYjrPOuPaGqfpPkU/edit#gid=0";
- key selfCheckRequestId;
- default
- {
- state_entry()
- {
- }
- touch_start(integer total_number)
- { selfCheckRequestId =
- llHTTPRequest( sheetURL,
- [HTTP_METHOD, "GET",
- HTTP_VERBOSE_THROTTLE, FALSE,
- HTTP_BODY_MAXLENGTH, 16384],
- "");
- }
- http_response(key id, integer status, list metaData, string body)
- {
- if (id == selfCheckRequestId)
- { string marker = "@!@";
- integer start = llSubStringIndex(body,marker);
- integer end = llSubStringIndex(body, "</td>");
- string fetch = llGetSubString(body,start + llStringLength(marker), end-1);
- llOwnerSay("\n response: \n" + fetch);\
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement