简体   繁体   English

如何在Chrome控制台的此代码中解决此错误?

[英]How to fix this error in this code for chrome's console?

I'm trying to use chrome's console, but I am getting this error. 我正在尝试使用chrome的控制台,但出现此错误。

I barely have experience in using chrome's console, so please try to explain the solutions to me thoroughly. 我几乎没有使用chrome控制台的经验,因此请尝试向我详细说明解决方案。

var hatIds = [362081769, 19027209] //This is the Ids of the hats
var PriceWanting = 1500 //This is the price


var Loop = setInterval(function(){
        for (var Id in hatIds) {
                var hatLink = "https://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)

Error Message: 错误信息:

Uncaught TypeError: Cannot read property '1' of null
    at Object.success (<anonymous>:10:61)
    at o (jquery-1.7.2.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.7.2.min.js:2)
    at w (jquery-1.7.2.min.js:4)
    at XMLHttpRequest.d (jquery-1.7.2.min.js:4)

What does this error message mean? 此错误消息是什么意思?

I'm not very experienced in using chrome's console, and this is someone elses' code from google i'm trying to use. 我在使用chrome的控制台方面经验不是很丰富,这是我尝试使用的其他人的google代码。

What this program is supposed to do is to go to the link generated by the ID's I provided an Roblox's standardized link system. 该程序应该做的是转到ID提供的链接,我提供了Roblox的标准化链接系统。 That link is an item link. 该链接是项目链接。 I'm trying to buy those items on Roblox for low prices by repeatedly checking if the price is low enough and buying the item. 我试图通过反复检查价格是否足够低并购买该商品来在Roblox上以低价购买这些商品。

通过单击该错误,您将从错误发生的那一行中得到...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM