Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[last question] ArguementOutOfBoundsException

Discussion on [last question] ArguementOutOfBoundsException within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[last question] ArguementOutOfBoundsException

Okay this is my last question, I keep getting tha error in my base source from impulse.

Here's the error:
Code:
index was out of range. Must be non_negative and less than the size of the collection
Here:

Code:
if (kernel.gamepool.containskey(this.entity.UID))
At here aswell:

Code:
iny Len = BitConverter.ToInt32(arg1, position); position += 4;
Here is the entity UID part:

Code:
public uint UID { get { return _uid; } set { _uid = value; WriteUInt32(value, 8, SpawnPacket); } }
I would like a little more explanation on this error and tips on how to get rid of it.

Regards,
Killersub
killersub is offline  
Old 10/09/2011, 02:03   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Either you were trying to access an index that was bigger than the length.

Ex.
Code:
int[] array = new int[] { 0, 1, 2, 3, 4, 5 };
int valid_value = array[6];//The value will be 5, because arrays are 0 indexed.
int invalid_value = array[7];//There is no 7th index in the array.
Or you were trying to enter a negative index.

Code:
int[] array = new int[] { 0, 1, 2, 3 };
int value = arry[-1];//the lowest index in an array is 0
BaussHacker is offline  
Thanks
1 User
Old 10/09/2011, 02:57   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by BaussHacker View Post
Either you were trying to access an index that was bigger than the length.

Ex.
Code:
int[] array = new int[] { 0, 1, 2, 3, 4, 5 };
int valid_value = array[6];//The value will be 5, because arrays are 0 indexed.
int invalid_value = array[7];//There is no 7th index in the array.
Or you were trying to enter a negative index.

Code:
int[] array = new int[] { 0, 1, 2, 3 };
int value = arry[-1];//the lowest index in an array is 0
So what are u implying? I tried using my SafeReturn method but no luck on that either.

None of my indexes (that I've checked) are negative/out of bounds that I know of.
killersub is offline  
Old 10/09/2011, 12:23   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Could be this:
iny Len = BitConverter.ToInt32(arg1, position); position += 4;

s position will be the psoition within the array (arg1).
BaussHacker is offline  
Old 10/09/2011, 15:07   #5
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by BaussHacker View Post
Could be this:
int Len = BitConverter.ToInt32(arg1, position); position += 4;

s position will be the psoition within the array (arg1).
so should I change the coversion type? The 'arg1' is in 'byte[]' form.
And the position is
Code:
ushort position = 7;
Just asking before I start changing **** around.
killersub is offline  
Old 10/09/2011, 15:49   #6
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Just make sure the position does not get bigger than the arraysize or that it's a valid packet.
BaussHacker is offline  
Old 10/09/2011, 15:59   #7
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by BaussHacker View Post
Just make sure the position does not get bigger than the arraysize or that it's a valid packet.
Code:
byte[] pubkey = new byte[Len];
Code:
for (int x = 0; x < Len; x++) pubkey[x] = arg1[x + position];
Are all associated with that code.

Would that be it?
killersub is offline  
Old 10/09/2011, 23:19   #8
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Your using impulse's source?
_DreadNought_ is offline  
Old 10/09/2011, 23:24   #9
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by _DreadNought_ View Post
Your using impulse's source?
Correct my friend.
killersub is offline  
Reply


Similar Threads Similar Threads
[Question] Wie ruft man in AutoIt eine Website per knopfdruck auf [Question]
08/04/2011 - AutoIt - 7 Replies
Wie ruft man eine Website per knopfdruck in AutoIt auf? Wenn geht Code und nochbesser Erklärung bei :D Danke schonmal im voraus :handsdown:



All times are GMT +2. The time now is 16:26.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.