繁体   English   中英

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

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

我正在尝试使用chrome的控制台,但出现此错误。

我几乎没有使用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)

错误信息:

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)

此错误消息是什么意思?

我在使用chrome的控制台方面经验不是很丰富,这是我尝试使用的其他人的google代码。

该程序应该做的是转到ID提供的链接,我提供了Roblox的标准化链接系统。 该链接是项目链接。 我试图通过反复检查价格是否足够低并购买该商品来在Roblox上以低价购买这些商品。

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

暂无
暂无

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

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