[Release]My source...

10/09/2011 16:51 killersub#316
Quote:
Originally Posted by F i n c h i View Post
Using IP 127.0.0.1 causes this client crash.
I'm about 90% sure the source is causing the problem, don't know why I haven't even touched it. Btw I use hamachi, so yeah.
11/14/2011 02:14 xskive#317
Hey can someone post a link to this source?
11/14/2011 03:12 Spirited#318
[Only registered and activated users can see links. Click Here To Register...]
11/14/2011 03:15 xskive#319
Quote:
Originally Posted by Fаng View Post
[Only registered and activated users can see links. Click Here To Register...]
Damn, that was fast.
11/14/2011 05:25 Spirited#320
Quote:
Originally Posted by xskive View Post
Damn, that was fast.
It was? o.o I responded an hour after you posted. Besides, this community helped me find my major and passion. The least I can do is give back.
12/16/2011 06:56 corbit15#321
Could somebody explain to me how to add dialog to an npc please? I know how to make the dialog, but when i build then debug the npc still says nothing. Not sure what i'm doing wrong so if anyone could tell me that'd be great, thanks.
12/16/2011 12:35 F i n c h i#322
Quote:
Originally Posted by corbit15 View Post
Could somebody explain to me how to add dialog to an npc please? I know how to make the dialog, but when i build then debug the npc still says nothing. Not sure what i'm doing wrong so if anyone could tell me that'd be great, thanks.
The case number should be the same as your NPC ID.
12/16/2011 19:03 corbit15#323
i've been making sure the case numbers are matching with the npc id but still doesn't work
12/17/2011 02:24 Spirited#324
Quote:
Originally Posted by corbit15 View Post
i've been making sure the case numbers are matching with the npc id but still doesn't work
Move the "Dialogs.cs" file to the main project, right about "Program.cs". Then delete the second project and rebuild it. There's NO benefit from splitting off the Dialogs into their own project. These days, if your computer can't build a solution in less than 3 seconds, there's something seriously wrong with it.

You shouldn't keep the dialogs like that either. Circular dependency is very poor style in programming and it causes a lot of problems... like the one you're experiencing.
12/17/2011 09:46 _DreadNought_#325
for a full source mine takes about 3-5seconds. nothing "wrong" with it?
12/17/2011 10:05 Spirited#326
Quote:
Originally Posted by _DreadNought_ View Post
for a full source mine takes about 3-5seconds. nothing "wrong" with it?
I'm referring to back in the days when it took more than a minute to compile something. I don't mean literally 3 seconds on the dot. Was that comment really necessary?
12/17/2011 10:24 corbit15#327
Quote:
Originally Posted by Fаng View Post
Move the "Dialogs.cs" file to the main project, right about "Program.cs". Then delete the second project and rebuild it. There's NO benefit from splitting off the Dialogs into their own project. These days, if your computer can't build a solution in less than 3 seconds, there's something seriously wrong with it.

You shouldn't keep the dialogs like that either. Circular dependency is very poor style in programming and it causes a lot of problems... like the one you're experiencing.
Thanks i got it working now :). Another question though, every once in a while i get a problem in program.cs with this line:

int Len = BitConverter.ToInt32(arg1, position += (ushort)(JunkLen + 4));

any idea why? i searched and found you posted something for it and i tried it and i thought it worked but it still happens every so often.

#EDIT nevermind i'm not having the problem anymore

#EDIT okay or not i just got the error again
12/17/2011 20:58 _DreadNought_#328
Ive had that many of times I fixed it by changing the routine.

Code:
                    try
                    {
                        Client.Exchange = false;

                        Client.Action = 1;
                        ushort position = 7;
                        uint PacketLen = BitConverter.ToUInt32(arg1, position); position += 4;
                        int JunkLen = BitConverter.ToInt32(arg1, position); position += 4; position += (ushort)JunkLen;
                        int Len = BitConverter.ToInt32(arg1, position); position += 4;
                        byte[] pubKey = new byte[Len];
                        for (int x = 0; x < Len; x++)
                            pubKey[x] = arg1[x + position];
                        string PubKey = System.Text.ASCIIEncoding.ASCII.GetString(pubKey);

                        Client.Cryptography = Client.DHKeyExchance.HandleClientKeyPacket(PubKey, Client.Cryptography);
                    }
Just uses a different method to do it. never had the problem since. could never figure it out either.
12/17/2011 21:38 corbit15#329
Quote:
Originally Posted by _DreadNought_ View Post
Ive had that many of times I fixed it by changing the routine.

Code:
                    try
                    {
                        Client.Exchange = false;

                        Client.Action = 1;
                        ushort position = 7;
                        uint PacketLen = BitConverter.ToUInt32(arg1, position); position += 4;
                        int JunkLen = BitConverter.ToInt32(arg1, position); position += 4; position += (ushort)JunkLen;
                        int Len = BitConverter.ToInt32(arg1, position); position += 4;
                        byte[] pubKey = new byte[Len];
                        for (int x = 0; x < Len; x++)
                            pubKey[x] = arg1[x + position];
                        string PubKey = System.Text.ASCIIEncoding.ASCII.GetString(pubKey);

                        Client.Cryptography = Client.DHKeyExchance.HandleClientKeyPacket(PubKey, Client.Cryptography);
                    }
Just uses a different method to do it. never had the problem since. could never figure it out either.
ah i almost had it lol i was one line off.

just tried it and the error showed up again right after i built and debugged O.o

#EDIT well after about 20 attempts i was actually able to login again. Has anyone had any problems in thread.cs and timer32.cs?
12/17/2011 23:20 _DreadNought_#330
Yes I had that problem in thread.cs and timer32.cs just ignore it.