ztizzlegaming / CSGOWinBig

Open-source Counter-Strike: Global Offensive jackpot betting website.
MIT License
169 stars 104 forks source link

[Solved] Bot crashes after selecting winner #174

Open keinervonuns opened 8 years ago

keinervonuns commented 8 years ago

Hi After the bot picks a winner due to potOver (timer is not working at all) and listing the won items (green at the top of the picture) i get the error as shown in the picture. The pot is also cleared, but there is neither a winner notification nor a trade offer with the winnings. Any ideas of a solution?

Thanks in advance

website: http://sexyskins.keiner.bplaced.net/

bot_cmd

andrewda commented 8 years ago

I think your deposit.php is returning some nonsense that the bot can't interpret as JSON.

keinervonuns commented 8 years ago

i checked the echo of my deposit php and it gave me: One of the required fields was not sent correctly or was left blank, in deposit.php i checked the variables that cause the error and all three returned "null" return I think they sould not be null?

andrewda commented 8 years ago

Copy-and-paste this as your deposit.php and nothing should have to change. https://github.com/ztizzlegaming/CSGOWinBig/blob/master/src/php/deposit.php

The issue is that your bot is receiving something before the JSON (</span>).

keinervonuns commented 8 years ago

before the i get this warnings

is it normal thgat it shows &amp instead of the apikey?

UPDATE: Hard-Coding the api key and password solved the json problem. now i only have to fix the timer because it wants to stop an not-running timer (Object reference not set to an object instance)

andrewda commented 8 years ago

Ok, so sounds like your passwords.txt file isn't being found or doesn't have an API key in it. You should open another issue for your second problem because it's not related.

keinervonuns commented 8 years ago

i remembered that i replaced the getsteamapikey() in the default.php withe the different keys needed for the files ($dbSteamAPIKey, $chatAPIKey) but i forgot about the one in deposit.php