Steam bot错误-TypeError:无法读取属性'0'的未定义

Steam bot error - TypeError: Cannot read property '0' of undefined

本文关键字:未定义 属性 读取 错误 bot -TypeError Steam      更新时间:2023-09-26

http://prnt.sc/azsj2r

当我试图在我的博彩网站上下注时,出现了这个错误,机器人接受了交易报价,但随后机器人崩溃了

第一件事:

1) MySQL查询是否正确?

SELECT COUNT (DISTINCT userid) AS playersCount From `game` + current_game

这似乎是错误的。。。我想你可能想要的是:

'SELECT COUNT(DISTINCT userid) AS playersCount From `game` where id =' + current_game + ';'

2) 处理错误

function(err, rows) {
    if(err) {
          console.log(err);
          return;
    }
    /*your code*/
}

这将使您了解查询失败的原因。

3) 该查询的返回类型是什么?这是你所期望的吗?

console.log(rows); //does this seems valid to you?