error

10/03/2018 20:46 BelieveGhost#1
Problem fixed thx
10/03/2018 23:47 _DreadNought_#2
scroll up the error more then post it
10/03/2018 23:49 BelieveGhost#3
Quote:
Originally Posted by _DreadNought_ View Post
scroll up the error more then post it

it's same errors i check it

Quote:
Originally Posted by _DreadNought_ View Post
scroll up the error more then post it


[Only registered and activated users can see links. Click Here To Register...]
10/04/2018 22:51 _DreadNought_#4
Quote:
Originally Posted by BelieveGhost View Post
it's same errors i check it





[Only registered and activated users can see links. Click Here To Register...]
not the same error is it?

"AccessViolationException" - That's ur issue here.
10/05/2018 01:18 BelieveGhost#5
Quote:
Originally Posted by _DreadNought_ View Post
not the same error is it?

"AccessViolationException" - That's ur issue here.
Umm so thats one?
Code:
 
public unsafe void WriteString(string val)
        {
            for (int i = 0; i < val.Length; i++)
            {
                try
                {
                    *((byte*)(Ptr + Count)) = Convert.ToByte(val[i]);
                }
                catch { }//For weird letters that cannot be converted into byte...
                Count++;
            }
        }
10/07/2018 18:12 BelieveGhost#6
What i should do to fix this problem ? My exe keep crash
10/08/2018 00:05 turk55#7
Quote:
Originally Posted by BelieveGhost View Post
What i should do to fix this problem ? My exe keep crash
You can stop running it :pimp:
10/08/2018 01:34 Spirited#8
Quote:
Originally Posted by turk55 View Post
You can stop running it :pimp:
^ Please do.
These threads hurt. He never learns. Ever.
10/08/2018 13:28 Super Aids#9
Quote:
Originally Posted by BelieveGhost View Post
Umm so thats one?
Code:
 
public unsafe void WriteString(string val)
        {
            for (int i = 0; i < val.Length; i++)
            {
                try
                {
                    *((byte*)(Ptr + Count)) = Convert.ToByte(val[i]);
                }
                catch { }//For weird letters that cannot be converted into byte...
                Count++;
            }
        }

(Ptr + Count) points to a memory address that is invalid.

I'm going to guess that Ptr is a property, so that would be your first issue, although I don't think that's issue here, BUT the GC is free to do whatever with your pointer when you leave the fixed scope.

Your problem is most likely that the buffer does not have enough memory allocated for what Count reaches.

It's a stupid and retarded packet-writer design anyway.

Also if what I said doesn't make sense to you then perhaps you should learn to program.