pepzwee / node-csgo-web-tradebot

Web based CS:GO trade bot. Similar to CSGOSell.
MIT License
147 stars 60 forks source link

This is weird. [UNKNOWN ERR] #169

Closed Suchismit4 closed 4 years ago

Suchismit4 commented 4 years ago

So, all previous issues were fixed.

But, idk whats this

ERR: Uncaught TypeError: Cannot read property 'market_hash_name' of undefined at n.<anonymous> (app.js:306) at n.emit (index.js:83) at n.onevent (index.js:83) at n.onpacket (index.js:83) at n.<anonymous> (index.js:83) at n.emit (index.js:83) at n.ondecoded (index.js:83) at a.<anonymous> (index.js:83) at a.n.emit (index.js:83) at a.add (index.js:83)

Explanation: So i added my own main.js before app.js, because i wanted to add a roulette system, and since that its causing this, when i remove that main.js.. it works fine.

Heres the sequence of how i added the js files `

`

APP.JS is same as it is

Here's the main.js ` $(function(){ var users = [], shuffled = [], loadout = $("#loadout"), insert_times = 30, duration_time = 10000; $("#roll").click(function(){ users = []; var lines = $('textarea').val().split('\n'); if(lines.length < 2){ $("#msgbox").slideToggle(100); setTimeout(function() { $("#msgbox").slideToggle(100); }, 3000); return false; } for(var i = 0;i < lines.length;i++){ if(lines[i].length > 0){ users.push(lines[i]); } } $("#roll").attr("disabled",true); var scrollsize = 0, diff = 0; $(loadout).html(""); $("#log").html(""); loadout.css("left","100%"); if(users.length < 10){ insert_times = 20; duration_time = 5000; }else{ insert_times = 10; duration_time = 10000; } for(var times = 0; times < insert_times;times++){ shuffled = users; shuffled.shuffle(); for(var i = 0;i < users.length;i++){ loadout.append('

'+shuffled[i]+'
'); scrollsize = scrollsize + 192; } }

    diff = Math.round(scrollsize /2);
    diff = randomEx(diff - 300,diff + 300);
    $( "#loadout" ).animate({
        left: "-="+diff
    },  duration_time, function() {
        $("#roll").attr("disabled",false);
        $('#loadout').children('td').each(function () {
            var center = window.innerWidth / 2;
            if($(this).offset().left < center && $(this).offset().left + 185 > center){
                var text = $(this).children().text();
                $("#log").append("THE WINNER IS<br/> <span class=\"badge\">"+text+"</span>");

            }

        });
    });
});
Array.prototype.shuffle = function(){
    var counter = this.length, temp, index;
    while (counter > 0) {
        index = (Math.random() * counter--) | 0;
        temp = this[counter];
        this[counter] = this[index];
        this[index] = temp;
    }
}
function randomEx(min,max)
{
    return Math.floor(Math.random()*(max-min+1)+min);
}

}); `

Suchismit4 commented 4 years ago

Guys, can you please help me in this condition Really in need of some help.. @pepzwee @iDefineHD :(

iDefineHD commented 4 years ago

Guys, can you please help me in this condition Really in need of some help.. @pepzwee @iDefineHD :(

We do not help with regards to 3rd party scripts etc being used. As you had said it's working fine without the added script, I am closing the Issue.

Suchismit4 commented 4 years ago

pepzwee would have suggested me a fix... thanks for your time.. you are not worth it for this resource.

iDefineHD commented 4 years ago

You are running a 3rd party script. Nothing to do with the project. How am I to respond. You also stated that it works fine without the modified code. You added. Therefore neither I or Pepz are obliged to help on the matter. Dont attack me for it.

Suchismit4 commented 4 years ago

Its not that matter. sorry for me raging, but atleast you coudl have mentioned whats the err on the script... atleast that would have helped me ,

Suchismit4 commented 4 years ago

Can you do that for me?

FreddyFish commented 4 years ago

No we can't. This project is open source, no one here is going to spoon feed you. If you have no idea what's wrong, you should probably not run this, or figure out what's wrong yourself. The worst part is that you expect us to help you, even though you are not running the official code. No one here will help you when you have that attitude of yours. Issue request should be made when there is something wrong with the code of the repo. Nothing is wrong, and it's working flawlessly. Come back when you have an issue and are running the OFFICIAL source. Have a nice evening.