Perform the CSharp OwnCode Input string was not in a correct format.

  • Автор темы Автор темы zenfreak
  • Дата начала Дата начала

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Реакции
12
Баллы
18
I have 300 lines of code in a c# code box playing in Project Maker. The code includes a loop and sometimes, apparently without reason, it stops and throws this error.

Код:
Развернуть Свернуть Копировать
Perform the CSharp OwnCode  Input string was not in a correct format.

It doesn't say the line number so how can I tell where is the problem?

The code is not relevant here as this happened on different occasions with different codes. So how can I debug if I don't know where to look?
 
We won't be able to answer, unless you give code sample which throws the error.
 
I don't really need you to debug this particular code as I find this issue in different occasions when building scripts and oftentimes I find the issue - what I need is how to find the exact line number where the errors occur.
 
@VladZen I agree to @zenfreak I have got same difficulties with this error. And only way to debug when You get this error is put in Your code many project.SendInfoTolog and try to see which string in all code makes that error.
It is easy to find problem in 50 lines of code, but if there is 200+ lines with many text processing logic's then to find bug is nightmare

UPD:

And another such error is "Sequence contains no elements" also does not give You line of error.
This you can get easy:
C#:
Развернуть Свернуть Копировать
string textToSplit = @"firstPart;SecondPart";
Macros.TextProcessing.Split(textToSplit, @";", "2").First();

Thanks
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)