Programming a Chatbot in C#

Non-D-Day related topics.
Post Reply
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Programming a Chatbot in C#

Post by Cerv »

I'm trying to successfully program a chatbot in C#, however it can only respond when I say Hello, to which it says hello back. Any other case and it just gives a blank response. Does anyone happen to know what I did wrong in the coding?Image
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
User avatar
Parts
Developer
Developer
Posts: 567
Joined: Thu Aug 14, 2003 5:42 pm
Contact:

Re: Programming a Chatbot in C#

Post by Parts »

What coding?
Image
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Re: Programming a Chatbot in C#

Post by Cerv »

Parts wrote:What coding?
What do you mean?
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
User avatar
Parts
Developer
Developer
Posts: 567
Joined: Thu Aug 14, 2003 5:42 pm
Contact:

Re: Programming a Chatbot in C#

Post by Parts »

You want someone to see if you did anything wrong in the coding....shouldn't there be some code to look at?
Image
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Re: Programming a Chatbot in C#

Post by Cerv »

Parts wrote:You want someone to see if you did anything wrong in the coding....shouldn't there be some code to look at?
There's something wrong with your computer or internet. There is a pic up there.
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
User avatar
Parts
Developer
Developer
Posts: 567
Joined: Thu Aug 14, 2003 5:42 pm
Contact:

Re: Programming a Chatbot in C#

Post by Parts »

I see the word "Image". If I right click it and copy the location, I get another word... "Unauthorized"
Image
User avatar
Parts
Developer
Developer
Posts: 567
Joined: Thu Aug 14, 2003 5:42 pm
Contact:

Re: Programming a Chatbot in C#

Post by Parts »

ok, I see it now.

Can't say I know what's wrong though. Maybe those "break"'s? Sounds like it's not getting past the 1st check. What happens if those breaks weren't there?

edit...

now I've posted this, the image doesn't show again :S
Image
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Re: Programming a Chatbot in C#

Post by Cerv »

Parts wrote:What happens if those breaks weren't there?
This is the result of removing the breaks. Let's hope the image shows up!
Image
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
User avatar
Parts
Developer
Developer
Posts: 567
Joined: Thu Aug 14, 2003 5:42 pm
Contact:

Re: Programming a Chatbot in C#

Post by Parts »

No idea then :D I've written quite a bit in C# but never used that particular type of syntax before.
If you swap out the 1st line with one of the others, I presume it will only work on that 1st line still?

The image hasn't shown up again since, so I can't speculate on what else it could be.
Image
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Re: Programming a Chatbot in C#

Post by Cerv »

Parts wrote:If you swap out the 1st line with one of the others, I presume it will only work on that 1st line still?
Yep
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
User avatar
InFerNo
Developer
Developer
Posts: 4375
Joined: Mon Aug 25, 2003 11:07 am
Location: dday2
Contact:

Re: Programming a Chatbot in C#

Post by InFerNo »

It still says unauthorized here.

You need to put breaks at the end of your code in every case scenario.

Just copy your code to http://pastebin.com like any normal coder would do and give us that link.
Image
User avatar
Cerv
Posts: 40
Joined: Fri Apr 10, 2015 6:32 pm
Location: Approximately 4,196 miles from Berlin
Contact:

Re: Programming a Chatbot in C#

Post by Cerv »

*UPDATE*

God, I feel so stupid. I wasn't using C#, I was using C++. I don't know how the hell I messed that up.
Took 11 years of playing dday to figure out the command is "shout afrow_shout4". I shall return to the battlefield with a burning vengeance and a wicked cackle.
acanais46
Posts: 1
Joined: Mon May 08, 2017 10:36 am

Re: Programming a Chatbot in C#

Post by acanais46 »

[Inf]PopLadd wrote: Tue Jul 14, 2015 1:03 pm I'm trying to successfully program a chatbot in C#, however it can only respond when I say Hello, to which it says hello back. Any other case and it just gives a blank response mutuelles TNS. Does anyone happen to know what I did wrong in the coding?Image
Moi je n'ai jamais travaillé en utilisant cet outil, mais j'aimerai bien.
Mr. YOur no fun
Developer
Developer
Posts: 5490
Joined: Sun Aug 10, 2003 9:48 pm
Contact:

Re: Programming a Chatbot in C#

Post by Mr. YOur no fun »

Good luck
Post Reply