-
Notifications
You must be signed in to change notification settings - Fork 911
SimpleUserHandler Help! #257
Comments
Why did you rename the settings file to |
Thanks @FunkyLoveCow I Tried to edit out everything... forgot that though. redjazz96 I renamed it settings.jsp because it said to in the configuration Guide. It said, "In order to run SteamBot you need to configure your bots propertly. This is done by creating a settings.json file located in the same place as the SteamBot executable or by renaming the settings-template.json" Was I not supposed to do that?I'll try it wih settings-template.json.Thanks For The Help So Far!-Mgamer |
Update: @redjazz96 Actually settings.jsp was a typo in my post. Sorry about that it is actually settings.json. |
Have you tried adding Like this: http://puu.sh/2G35C.png Name it ScrapUserHandler.cs and change |
Yeah I've tried that but Then another error came up in the console in red and when I tried to trade it the trade would open then just close and the bot would go offline. By any chance waylaidwanderer would you let me have a file that you use for your bots but edit out all your important imformation. Maybe I can run that with my information and it will work? If you can't it's fine.Thanks For The Help Guys!
|
Now I changed it to SteamBot.ScrapUserHandler and the file name is ScrapUserHandler in the directory of C:\Users(Name)\SteamBot\SteamBot |
Actually I didnt just change it but It was changed before I got the error |
Everyone, please note that the file name for your BotControlClass is completely irrelevant! It must be the fully-qualified type name. If you had a type Granted, if following good programming practice, the type name (including namespace hierarchy) and file name and path should match. For example: The type: class SteamBot.UserHandlers.MyTestHandler should be at:
The issues is, this is not mandatory. That type could be in any file, in any directory in the project. Also, @mgamer5279 are you recompiling the project after you make your changes? |
Sorry I dont have experience with coding but how do you recompile the project? |
Thanks guys for the amazing help on my first post on github! The Problem Was Solved! Thank You Pheonix! |
@mgamer5279; what was the solution? |
Solution: This sort of thing has been covered 20x over. The instructions lay it all out, read them. If you're just using the SimpleUserHandler, all you need to do is rename the settings-template.json to settings.json. If you're using a different UserHandler:
|
@iMagooo that was uncalled for. @lastofspades was just asking @mgamer5279 how he solved the problem, which he should have posted here. |
Yes, you're right, apologies to @lastofspades, I hadn't had my morning coffee. I shall edit the post now. |
@iMagooo No problem, and I've obviously read all of the comments before posting. I've ran enough game servers to know JSON config files well enough. However, I do apologize for replying on a ~2 month old thread. I know people get mad when "necro-ing" threads, but no idea what the convention is like on Github. "Step #3 - Ensure that the CustomUserHandler correctly inherits from UserHandler" I think this might be the thing I'm looking for. I've already tried to compile it, and I had an error that said: 'SteamBot.ScrapUserHandler' does not implement inherited abstract member 'SteamBot.UserHandler.OnLoginCompleted()' I could literally not find the solution to this until now. I've Googled and found some complicated code fix on StackOverflow, but I don't know the language C# itself well enough to get anything useful out of it. That being said, thanks for the reply. Even if it was a harsh one at first. ;-) |
@cwhelchel Thanks, I solved it right away after reading your first sentence. :-) |
@lastofspades Hate to necro post, but how did you solve that OnLoginCompleted error? I have had it for a while now and have tried everything... |
@bennyd87708 #427 & #527 |
Hey, I'm currently using the SteamBot and I want to import the SimpleUserHandler.cs Posted for scrapbanking here But when I put that in Steambot/SimpleUserHandler.cs and I launch the SteamBot.exe it runs fine but it doesn't load the Handler I loaded. All it can do is take scrap and when I try to put in items it just says There was an error in your trade. This is the whole chat:
This is my settings file(renamed settings.json):
I would greatly appreciate the help for this if you can help me! Thanks!-Mgamer
The text was updated successfully, but these errors were encountered: