The online racing simulator
Wierd Error :S Help?
(5 posts, started )
Wierd Error :S Help?
Hi,

I have added a new Bank Cash system but when i started to script i got alot of errors. Finally i have found the solution to what was cousing the errors. I dident add something in clsConnection.cs witch was this:

public long Cash
{
get { return _cash; }
set { _cash = value; }
}

After i entered this i got no errors. But when compiling i get this error when launching the InSim:

NCN - Index and length must refer to a location within the string. Parameter name : length

Anyhelp? Thanks
Solved!
Ok not solved please give me some help! :s I just found out when i added :


<?php 
NewConn
.TotalBankCash FileInfo.GetUserTotalBankCash(NCN.UName);
?>

It gives the error any help?
Just seeing a couple of lines of code that really do not have that much to do with each other one can only guess... I take it that you are using some ready-made base? Perhaps you should tell us what it is, then people who know how that particular program code works can help you more

The "Index and length must refer to a location within the string" error means that you are trying to parse a substring out of a longer string but the substring's start and/or end indexes are out of bounds. An example would be to for example try and get the first four letters of the word "egg" - that's not going to work for obvious reasons.

I would start looking for string parsing action in GetUserTotalBankCash as that is the line that causes the error and check that it parses strings correctly.
Quote from hyntty :Just seeing a couple of lines of code that really do not have that much to do with each other one can only guess... I take it that you are using some ready-made base? Perhaps you should tell us what it is, then people who know how that particular program code works can help you more

The "Index and length must refer to a location within the string" error means that you are trying to parse a substring out of a longer string but the substring's start and/or end indexes are out of bounds. An example would be to for example try and get the first four letters of the word "egg" - that's not going to work for obvious reasons.

I would start looking for string parsing action in GetUserTotalBankCash as that is the line that causes the error and check that it parses strings correctly.

I think i get we're you are going Well im using the Cruise base by dougie-lampkin. But i do think i know we're you are going and ill solve it my self

Thanks for the help i really appreciate it

Wierd Error :S Help?
(5 posts, started )
FGED GREDG RDFGDR GSFDG