Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / I think it's a bug

Author
Message
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 9th Apr 2005 14:07
I am having a small bug when if I have a piece of code like this

if moving=0

if legR#>oldlegR#
Rlegdiff#=legR#-oldlegR#
legR#=legR#-Rlegdiff#
endif
if legR#<oldlegR#
Rlegdiff#=oldlegR#-legR#
legR#=legR#+Rlegdiff#
endif

if legL#>oldlegL#
Llegdiff#=legL#-oldlegL#
legL#=legL#-Llegdiff#
endif
if legL#<oldlegL#
Llegdiff#=oldlegL#-legL#
legL#=legL#+Llegdiff#
endif
endif

I will compile the program and it will say that the last endif is out of place

does anyone have any suggestions

I have know idea what sflm stands for
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 9th Apr 2005 14:48
you sure that the ONLY code? Remember if you do an "else if" somewhere in your code (that you are not showing) it requires an endif too.
Cryptoman
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 9th Apr 2005 14:51
I think your bug is somewhere else then that bug. You've done something that confused the compiler before that code.


RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 9th Apr 2005 15:55
Take that code and compile it by itself, you'll see that it compiles. So, as indicated previously, your problem is elsewhere in your code. A common mistake I make is to Use IF THEN and then decide to break the line of code into several lines - I forget to delete the THEN after the IF - and I'll get a similar error to what you got.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2024-09-23 17:27:31
Your offset time is: 2024-09-23 17:27:31