|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
05-28-2006 20:39
http_response seems to return a request even when I do not ask for it. So when I use the code below to get a request, I get back a raw request and the formatted one. How do I stop the automatic request from coming back? I only want the one I request: http_response(key request_id, integer status, list metadata, string body) { integer x = llSubStringIndex(body, "<answer>") + 8; integer y = llSubStringIndex(body, "</answer>") - 1; string answer = llGetSubString(body, x, y); if(answer == "") { llWhisper(0,"Please try again later."); } else { llSay(0, answer); } }
On my wbpage, it returns <answer>My text to return to the LSL script</answer>The http_response gives me this: Object: er>My text to return to the LSL script Then gives me this: Object: My text to return to the LSL script Which is how it SHOULD be. If I comment out llSay(0,answer); it still puts out Object: er>My text to return to the LSL script which does not make sense if I am not telling the script to write that.
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
05-28-2006 20:48
Hey, I just tried your code, copy and pasted.
Works exactly as you wanted.
My php script simply does:
<? echo '<answer>My text to return to the LSL script</answer>'; ?>
And I got just the text in <answer></answer>
|
|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
05-29-2006 06:56
Very strange. Let me look over my website script then. Perhaps it is outputting it again somwhere. Thanks for checking it for me. Much appreciated!! 
|