Unexpected End of File and i dunno wh
-
Hey. i just bought Fuze4, and started to make a text based game. But, when i run it, there’s always an “Unexpected End of File” error somewhere. Code is pictured below.
-
Hi there. I would recommend working through the tutorials before diving right in: https://fuzearena.com/help/view/Loops
There are a few problems with your program as it stands. Fuze is not a traditional Basic programming language. For instance goto is not supported because it encourages bad programming practice and difficult to follow code. The line numbers are there for reference only. Also if requires an endif and it is controls() not control()
I think that the following will do what you are trying to do:
// This structure is known as a game loop - it runs at 60 frames per second loop // start loop clear() // clear the frame buffer c = controls(0) // read the state of the controls if c.a then // check for A button press print("hi.") // print to frame buffer endif update() // display framebuffer repeat // repeat
-
@kurbusmax So as pianofire said there is no goto in fuze.You dont even need goto cause you could make a function and instead of jumping to a line where the stuff is who you want to execute you can call the function.
-
@kurbusmax If you need help by programming
(Only if its not stuff with math or much graphical stuff) then you can send me a msg.
You can also send me an msg if you need help with making games but the other guys can help you better with this topic. But for all about text or analyzing strings you can feel free to contact me. -
oh i figured it out i was missing an endif
-
@kurbusmax I come from python so it happens me also very often that i forget to make and ifs and stuff like this i sometimes make an : after "if"
And i often forget "then" es well -
I come from Py and VBS so this is all confusing to me
-
@kurbusmax VBS has endif and stuff like this or hasnt it ?
-
@petermeisenstein said in Unexpected End of File and i dunno wh:
@kurbusmax VBS has endif and stuff like this or hasnt it ?
it doesn't it just ends after the line
-
@kurbusmax if you are still looking for a goto like feature make sure to to check this out https://fuzearena.com/forum/topic/1099/a-goto-workaround