How on earth did this happen?

  • Neospector
    2nd May 2011 Member 0 Permalink
    I had been making nighttime display. It didn't work so I cut it out. Now, I receive:
    http://pastebin.com/WuyAyrgP
    Here is the code, which just so happens to be the line code. I have absolutely no idea how editing the display modes triggered this.
    http://pastebin.com/pMRL1eRU
    Anyone know why this is happening?
  • jacksonmj
    2nd May 2011 Developer 0 Permalink
    Possibly because you have acquired a random semicolon just before the curly bracket at the beginning of draw_line?
  • Neospector
    2nd May 2011 Member 0 Permalink
    @jacksonmj (View Post)
    In case you mean on line 1226, it says that it expected a semi-colon there.
    Edit: Or line 2 on pastebin, your choice.
  • jacksonmj
    2nd May 2011 Developer 0 Permalink
    (yes, line 2 on pastebin)
    There should be no semicolon there. If it complains about expecting one when it isn't there, you've probably got a '{' without a matching '}' somewhere earlier on in graphics.c
  • Cr15py
    2nd May 2011 Member 0 Permalink
    @Neospector (View Post)
    How much C experience do you have? In any case, let me imbue you with this knowledge, think of the compiler as a retarded monkey, it can only tell you when you have a problem, and give you a vague idea of what it is. On almost all occasions when it says it's expecting something somewhere, that's not the problem. Also, occasionally when classes, etc. aren't closed with a ; the compiler will tell you there's an error in the file that included them, not the actual header.

    tl;dr - Compiler is a tard, some problems cause wierd errors, error usually isn't what compiler says it is.
  • Neospector
    2nd May 2011 Member 0 Permalink
    @jacksonmj (View Post)
    Yes that did it. I accidentally closed off my display code too late.
    @Cr15py (View Post)
    Everything anyone makes is just code. A bot once asked me if we could "be" Latin together.