Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem you have appears to be a <code>Substring</code> operation with invalid parameters. That's the error anyway. </p> <p>What is that line of code doing in <code>buttonObradi_Click</code>? Maybe the problem you have is because of a false relative path to the file you want to open. Or the path of your exe, more likely. Like, you search for the fourth backslash and do a <code>Substring</code> from there... if your exe is in a path with less than 4 backslashes, you're in trouble :) Just an example. </p> <p><strong>EDIT</strong>: fact is, <code>Substring</code> does generate an error, and the only substring in you code is <code>grade.Substring(0, 1)</code>. So grade has to be empty. You say this happens only on some machines, so my guess is, the excell on that machine is formatted differently. As far as I can determine from the code, you parse the excell expecting the row with the <code>grade</code> to come before that with "Agent Name". This if:</p> <pre><code>else if (redak[1].ToString() == grading1 || redak[1].ToString() == grading2 || redak[1].ToString() == grading3 || redak[1].ToString() == grading4 || redak[1].ToString() == grading5 || redak[1].ToString() == grading6) </code></pre> <p>has to pass first and initialize the grade, before this line:</p> <pre><code>if (redak[1].ToString() == "Agent Name") </code></pre> <p>sets your <code>citaj</code> to true. Otherwise your <code>grade</code> variable is never initialized and of course the Substring fails.</p> <p>I hope I understood that correctly, I haven't really debugged the whole code. So I think you should check the excells on the machines this is not working, see if they are wrong or you need to adjust your code to match that formatting too. But I still don't understand why this would work from the RAR and not outside of it.... </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload