Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Unexpected end of file

    Beginners
    3
    7
    192
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      porkchop1526 last edited by

      So I'm making a trivia game and I code everything and at the end I put
      update()
      sleep(3)
      No matter what I do it keeps coming up with "Unexpected end of file" I am very new so I dont know what to do

      1 Reply Last reply Reply Quote 0
      • Martin
        Martin Fuze Team last edited by

        I don't know how long your code is, but could you type or show some of it please? Or submit it for sharing and then at least the admins will be able to see it.

        It sounds like you're probably missing an endif or a repeat or something like that but it's impossible to tell without seeing it.

        1 Reply Last reply Reply Quote 0
        • P
          porkchop1526 last edited by Martin

          If score == 2 then
              Print(text)
          Endif
          If score ==1 then
              Print(text)
          Endif 
          If score == 0 then
              Print(text)
          Endif
          Update()
          Sleep(3)
          
          1 Reply Last reply Reply Quote 0
          • P
            porkchop1526 last edited by porkchop1526

            I think I see what is happening but now I have a new problem. it says the unexpected ending is on a line that doesn't exist. I only have 46 lines and it automatically creates a 47th line with nothing on it.

            1 Reply Last reply Reply Quote 0
            • Martin
              Martin Fuze Team last edited by

              Unfortunately we can't begin to guess because you've only shown us 11 lines of code.

              1 Reply Last reply Reply Quote 0
              • P
                porkchop1526 last edited by

                I just realized I was missing a random endif lol

                P 1 Reply Last reply Reply Quote 4
                • P
                  petermeisenstein F @porkchop1526 last edited by petermeisenstein

                  @porkchop1526 It happens me also very often. but i often forget return void at the end of functions . :D

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post