Results 1 to 6 of 6
Like Tree2Likes
  • 2 Post By JosAH

Thread: Is there anyway to do a total script reset if an error occurs in this script?

  1. #1
    Mitchell is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Question Is there anyway to do a total script reset if an error occurs in this script?

    Just wondering, can anyone help, and or edit it/ give me the line of code to do so?

    var hatIds = [114549522, 101008467, 1073690, 60675871, 7636350, 113329705, 114693174, 99855478, 114385354, 112609138, 22787168, 95245701, 96103379, 48039013, 82332012, 2264398, 27345567, 64560336, 102619387, 113325603, 110336757, 110207471, 97161222, 63241985, 113333065, 64560336, 60662839, 111903124, 90249069, 67995931, 114687236, 60331861, 66330204, 49763737, 82332012, 16598440, 102613165, 40892630, 54578891, 68352624, 67571288, 98349022, 63997108, 82665932, 106708987, 28502997, 91676854, 16598444, 16598513, 22787168, 46846024, 28998459, 25545089, 18017365, 18776718, 21294489, 20577851, 108158379, 99119240, 80661504, 73829193, 69499437, 113332841, 23726438, 108147416, 100929604, 98346834, 65417235, 72082328, 63993237, 69938512, 63992958, 63043890, 60115635, 44114719] //This is the Ids
    var PriceWanting = 24 //This is the price


    var Loop = setInterval(function(){
    for (var Id in hatIds) {
    var hatLink = "http://m.roblox.com/items/" + hatIds[Id] + "/privatesales"
    $.get(hatLink,function(data){
    var Regex = /\<span class="currency-robux">([\d,]+)\<\/span\>/
    var PriceSelling = data.match(Regex)[1]
    PriceSelling = Number(PriceSelling.replace(",",""))
    if (PriceSelling <= PriceWanting) {
    var Regex2 = /<a href="\/Catalog\/VerifyTransfer\DuserAssetOptionId=([\d,]+)\Damp;expectedPrice=([\d,]+)">/
    var HatBuyId = data.match(Regex2)[1]
    var HatBuyLink = "http://m.roblox.com/Catalog/VerifyTransfer?userAssetOptionId=" + HatBuyId + "&expectedPrice=" + PriceSelling
    var Explorer = document.createElement('iframe');
    function Buy(){
    Explorer.contentDocument.forms[0].submit();
    };
    Explorer.onload = Buy;
    Explorer.width = "300";
    Explorer.height = "400";
    Explorer.src = HatBuyLink;
    document.body.innerHTML = "";
    document.body.appendChild(Explorer);
    clearInterval(Loop)
    }
    });
    }
    console.log("!")
    },0)

  2. #2
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    258
    Rep Power
    2

    Default Re: Is there anyway to do a total script reset if an error occurs in this script?

    This is a Java forum, JavaScript is not Java.

  3. #3
    Mitchell is offline Member
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Default Re: Is there anyway to do a total script reset if an error occurs in this script?

    Quote Originally Posted by monkeyjr97 View Post
    This is a Java forum, JavaScript is not Java.
    then where do i ask this?

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,344
    Blog Entries
    7
    Rep Power
    20

    Default Re: Is there anyway to do a total script reset if an error occurs in this script?

    You can ask Java questions in a Java forum, so you can ask JavaScript questions in a ...

    Jos
    jim829 and DarrylBurke like this.
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,384
    Rep Power
    5

    Default Re: Is there anyway to do a total script reset if an error occurs in this script?

    Duh!!
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Is there anyway to do a total script reset if an error occurs in this script?

    Closing this off-topic thread.

    db

    THREAD CLOSED
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Error in a simple script I am working on.
    By cooldood in forum New To Java
    Replies: 1
    Last Post: 12-15-2012, 06:55 AM
  2. Help java script error
    By ellybeth in forum New To Java
    Replies: 7
    Last Post: 08-20-2009, 05:23 AM
  3. java script
    By satti in forum Web Frameworks
    Replies: 0
    Last Post: 06-09-2009, 08:53 AM
  4. 'Permission denied' java script error
    By java08 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-13-2009, 08:19 AM
  5. Replies: 4
    Last Post: 07-31-2008, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •