Page 1 of 1
compile error
Posted: Thu Dec 22, 2005 8:09 pm
by sid6.7
i get this msg pointing to this section of my code
237B 012E expression too complex
the section was larger so i broke it down
to this msall part but i am still getting the
error while compling..
when running the program as a BAS its fine
Code: Select all
lanips:
'checking to see if the spinal is particle or meson or NONE
LET spine$ = ""
LET spin = 0
LET spynal = 0
'is the ship BIG enough?
IF tons > 99999 THEN
LET spin = INT(RND * 2) + 1
END IF
RETURN
Posted: Thu Dec 22, 2005 8:14 pm
by Nodtveidt
Don't use LET.

Re: compile error
Posted: Thu Dec 22, 2005 8:53 pm
by MystikShadows
sid6.7 wrote:i get this msg pointing to this section of my code
237B 012E expression too complex
the section was larger so i broke it down
to this msall part but i am still getting the
error while compling..
when running the program as a BAS its fine
Code: Select all
lanips:
'checking to see if the spinal is particle or meson or NONE
LET spine$ = ""
LET spin = 0
LET spynal = 0
'is the ship BIG enough?
IF tons > 99999 THEN
LET spin = INT(RND * 2) + 1
END IF
RETURN
Like Nek said, LET is a useless command provided for backwards compatibility only.
Also, you might want to check the DataTYpe for tons, make sure it's LONG, not integer. since you're comparing against 99999 and integers, in QB, only go up to 32768.
Hope this helps.
Posted: Thu Dec 22, 2005 10:12 pm
by sid6.7
hmmm i removed all the lets, i tried LONG VS INT
i tried making numbers smaller IE...99999 /4 = mini
tons = tons /4
if tons > mini then blah blah blah...
then i even removed EVERYTHING so it was blank
IE...
lanips:
RETURN
and it still gave me that same error....
could i have too many lines of code? 1024...
its so wierd that it works fine as a *.BAS but wont compile
why is that?
Posted: Thu Dec 22, 2005 10:24 pm
by Z!re
sid6.7 wrote:hmmm i removed all the lets, i tried LONG VS INT
i tried making numbers smaller IE...99999 /4 = mini
tons = tons /4
if tons > mini then blah blah blah...
then i even removed EVERYTHING so it was blank
IE...
lanips:
RETURN
and it still gave me that same error....
could i have too many lines of code? 1024...
its so wierd that it works fine as a *.BAS but wont compile
why is that?
Are you sure the error is in that part?
Posted: Thu Dec 22, 2005 10:31 pm
by sid6.7
here is there error code again
when i run make standalone EXE
Code: Select all
2372 012E lanips:
^expression too complex
0 warnings
1 severe error
42909 bytes available
29734 bytes free
i assumed that since it prints lanips it meant that section?
slap me silly....
Posted: Fri Dec 23, 2005 12:42 am
by sid6.7
oopsy....rookie mistake
it was in a section ABOVE lanips:
i had a double subtraction going on in a formula
IE
blah = int(blah - blah - - blah - blah)
so the error msg must print out the next line
after the KABOOM?
sigh....