can't solve function balance problem

BlitzMax Forums/BlitzMax Programming/can't solve function balance problem

woolybuger(Posted 2009) [#1]
I keep getting no function for function end compile error.
It always stops on the same fuction end statement in the middle of the program.

I have check all if and if end
I have check all for and next

any idea on where to look

search finds function then function end for each subroutine


Blueapples(Posted 2009) [#2]
When this sort of thing happens I often end up doing one of two things:

1) Cut huge parts of the code out and try to build, cut different parts until the syntax error goes away - this limits your search.

2) Untab the entire file & retab it following strict tabbing guidelines (after every block statement indent one tab, on every end statement unindent one tab).

I think one of the IDEs does (2) automatically. Not sure which.


ziggy(Posted 2009) [#3]
If you're under windows, get BLIde free here:
http://www.blide.org/?section=getfree , open your code there, alse select view / Online bug analyzer and it'll help you a lot finding any unmatched end identifier. You'll get them underlined in red in the IDE. If you're on mac or linux... just be patient and you'll find it.


woolybuger(Posted 2009) [#4]
thanks , good advice


EOF(Posted 2009) [#5]
One other tip is to use Rem .. EndRem to comment out large blocks of code rather than having to 'cut' the code out of the program

Silly question .. which version from below are you doing?
You should be doing the latter

Function abc()
...
Function End


Function abc()
...
End Function