Jump to content

evandude

Members
  • Content Count

    2
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About evandude

  • Rank
    Newbrie
  1. every line of code after a certain point in my program gives an error. it is all valid code, as there are several sections in a row that are just several copies of the same thing, but with different variables. everything compiles just fine up to this certain point, and then every line it encounters generates an error. if i put '//' before any of the lines generating an error, it just gives an error for the next line it encounters... no matter how many lines I turn into comments, it keeps giving errors on the next ones. the errors it gives are either: general error (in the case of brackets, else statements, etc) redefinition error (when trying to set a variable equal to a number, ie- a=0;) or error in function definition (when trying to call a function, ie- delay_ms(100); I am using the program in the evaluation period, is there some sort of code limit that I have hit that is causing this? I'm using 5.1.1 here, I have also tried it with 5.1.2, that didn't work either. just for an example, here is the section of code that it starts screwing up on: if(recock[1]>recock[6]) { recock[1]=recock[1]-recock[6]; maketone(100,1); delay_ms(200); delay_ms(200); } else { recock[1]=0; recock[0]=recock[0]-1; maketone(100,1); delay_ms(200); delay_ms(200); } here are the errors: line 352: General error line 353: General error line 354: Redefinition of 'recock' Line 352 is the line with a bracket on it, above the else statement.
  2. I'm not sure this is the right section of the forums to be posting this in, I apologize if it's not... here's the section of code where I'm getting errors: if(recock[1]>recock[6]) { recock[1]=recock[1]-recock[6]; maketone(100,1); delay_ms(200); delay_ms(200); } else { recock[1]=0; recock[0]=recock[0]-1; maketone(100,1); delay_ms(200); delay_ms(200); } the errors I get: C2C_RE~1.C(351): Error: General error C2C_RE~1.C(352): Error: General error C2C_RE~1.C(353): Error: Redefinition of 'recock' line 351 is the bracket right before the else statement. I am using the exact same code in several other places in my program, just with different arrays... no idea why this one is the only one giving me trouble... before applying the 5.1.2 patch, it was giving the same errors, but one line forward (ie- lines 352-354 instead of 351-353) which makes more sense because the error about redefinition of recock was pointing to a line that actually dealt with the recock array... of note, is that if I just temporarily make that whole else statement section a comment, then the compiler reports the same errors around the very next else statement it finds... or, if I make the first line, or 2, or 3, etc. of that else statement section a comment, it will just find an error with the next one. (redefinition error for the first 2, function definition error for the next 3) I am using the program in the evaluation period. it just seems very odd that the compiler didn't find any error when exactly the same code was used a couple times previously, with different arrays, but after about line 350 it gives an error on the first else statement it finds... am I hitting some sort of evaluation version limitation or something? it just seems like any code after line 350 is invariably giving errors.
×
×
  • Create New...