UbiquitousStudio Posted May 16, 2016 Share Posted May 16, 2016 Hello, I am trying to change the state while outputting the body of a website. I can move it to the next state fine, but the output doesn't happen, is there any way around this by any chance?Here is my codestring updateurl = "No URL"; key updatekey; list updateparams = [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"]; string username; default { state_entry() { } touch_start(integer total_number) { updatekey = llHTTPRequest(updateurl, updateparams, "username=" + username); } http_response(key request_id, integer status, list metadata, string body) { if(request_id == updatekey) { llOwnerSay("\n" + body); } } } state idle { state_entry() { llOwnerSay("Idle State"); } touch_start(integer total_number) { } }I am simply trying to get to the idle state, but still output the body of the website. Accept when I go to idle it skips the body. I can't think of a workaround so I am here asking. Thanks again! Link to comment Share on other sites More sharing options...
cedric2011 Posted May 16, 2016 Share Posted May 16, 2016 http_response(key request_id, integer status, list metadata, string body) { if(request_id == updatekey) { llOwnerSay("\n" + body); STATE idle; <--- add this } } That should work, but you will never go to idle if you never see a response. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now