Jump to content

Question

Posted (edited)
integer systemchan = -111;
integer syslis;
string baseurl = "http://www.^^^^^^^^^^^^^/petname/";
string filename = "Breedable_Pet_Breed_Genes.php";
string password = "^^^^^^^^";
string method = "breedpetdetailsSEX";
string mpetid = "GODMOTHER";
string fpetid = "GODFATHER";
string mmpetid = mpetid;
string mfpetid = fpetid;
string fmpetid = mpetid;
string ffpetid = fpetid;
string sex = "Male";
key fetchid;
fireURL()
{
    string url = baseurl+filename+"?action="+method+"&password="+password+"&mpid="+mpetid+"&fpid="+fpetid+"&mmpid="+mmpetid+"&mfpid="+mfpetid+"&fmpid="+fmpetid+"&ffpid="+ffpetid+"&sex="+sex+"&userid="+(string)llGetOwner();
    fetchid = llHTTPRequest(url,[],"");
}
string newpetid;
integer createcountdown = 0;
createpet()
{
   llRezObject("CBXGhostMonkNest",llGetPos()+<0,0,0.250>,ZERO_VECTOR,llGetRot(),123);
}
integer locked = 0;
default
{
    object_rez(key id)
    {
        llSleep(2.0);
        llRegionSayTo(id,systemchan,"CREATEPET^"+newpetid+"^"+mpetid+"^"+fpetid);
        llGiveInventory(id,"CBXGhostMonkNest");
        llGiveInventory(id,"CBXGhostMonk");
        llSleep(2.0);
        llDie();
    }
    state_entry()
    {
        sex = llGetObjectDesc();
        llSetText("Touch me to birth this "+sex+" offspring",<1,1,1>,1);
    }
    timer()
    {
        if(createcountdown > 0)
        {
            createcountdown--;
            if(createcountdown == 0)
            {
                createpet();
            }
        }
        llSetText("Waking up the baby in "+(string)createcountdown+" sec(s)",<1,1,1>,1);
    }
    http_response(key r,integer s,list d,string body)
    {
        if(r == fetchid)
        {
            newpetid = body;
            createcountdown = llFloor(llFrand(120.0));
            llSetTimerEvent(1.0);
        }
    }
    touch_start(integer x)
    {
        if(llDetectedKey(0)!=llGetOwner())return;
        if(locked == 0)
        {
            locked = 1;
            fireURL();
        }
    }
}

 

please someone can help me with this problem? this is a generator script for breedable. this breedable communicates with the php server

everything work fine,my problem is (URL passed to llHTTPRequest contains a control character) then cannot communicate php with secondlife. i m not a scripter but i buy this full system on marketplace and the seller don't want help me..please anyone

 

Ver: 10.1.2
age: 0
hunger: 0
passion: 0
sex: Male
coat: Normal
eye: Normal
size: Normal
PETID: <br />?<b>Parse error</b>:  Invalid numeric literal 

Edited by peppos Popstar

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

This post really belongs in the LSL Scripting forum, so if you don't get a satisfactory answer here, I suggest asking the moderators to move it.

 Give a try at just replacing 

fetchid = llHTTPRequest(url,[ ],"");

with 

fetchid = llHTTPRequest(llEscapeURL(url),[ ],"");

That might work.

Share this post


Link to post
Share on other sites
  • 0

Oh, well.  I said it might work.  By the way, I assume that the row of carets in

string baseurl = "http://www.^^^^^^^^^^^^^/petname/";

and again in

string password = "^^^^^^^^";

are just placeholders that you put there to hide the real site URL and password when you posted here, right?  You're replacing them with the real values when you run the script....

Share this post


Link to post
Share on other sites
  • 0

Rolig Loon this caracter ^^^^^^^^^^ is for hide the password sry 

integer systemchan = -111;
integer syslis;
string baseurl = "http://www.ghostbreedable.co.uk/petname/";
string filename = "Breedable_Pet_Breed_Genes.php";
string password = "Test";
string method = "breedpetdetailsSEX";

Share this post


Link to post
Share on other sites
  • 0

I suggest just adding a line that shows you what you're passing as the url.

My guess would be that one of those values you're using to construct it has a bad character in it.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...