Qbasicnews.com
July 18, 2019, 09:28:33 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: You've got to be kidding me... :P  (Read 2230 times)
Anonymous
Guest
« on: April 12, 2004, 03:26:48 PM »

Has anyone ever gotten an "Expression too complex" error when trying to compile? If so, how do I get around it?HuhHuh Tongue This is not a joke I swear Wink
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #1 on: April 12, 2004, 04:14:30 PM »

Are you using DATA statements, or very long lines? split.

It would help that you posted the exact error message (I mean a screenshot) and the line or statement which is causing it.

This should be a good addition to the rules: "if you post to be helped for a compile error, provide the exact error, and all the info the compiler provides" Tongue That helps when answering Cheesy
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #2 on: April 12, 2004, 04:47:44 PM »

Yes, I've seen that before. Just break up the line it chokes on. (Sometimes you have to use temporary variables.)
Logged
Anonymous
Guest
« Reply #3 on: April 12, 2004, 05:33:56 PM »

the funny thing is i already am... here ill post a fragment.

Code:
ThisYTile = (YTile + (YPut \ Engine.YTileSize)) * (MapXSize)
      ThisXTile = XTile + (XPut \ Engine.XTileSize)
      ThisTile = ThisYTile + ThisXTile
      TileSnatch = ThisTile

      TileOffset = VARPTR(Tiles((Map(RoomCurrent, ThisTile + (Room(RoomCurrent).TotalExits * 5)) * TileIndices) + 1))
      TileSegment = VARSEG(Tiles(0))

      XTemp = XPut - XOffset
      YTemp = YPut - YOffset
     
      CSSprite Layer%, XTemp, YTemp, TileSegment, TileOffset


It's the last line that's friggin it up. I've broken it down as far as I can. It's compiled before, no changes have been made to this part of the program. Is there something deeper that can be happening that's just being manifested as this, you think?  :Huh:
Logged
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #4 on: April 12, 2004, 06:18:54 PM »

Break this line down:
Code:
TileOffset = VARPTR(Tiles((Map(RoomCurrent, ThisTile + (Room(RoomCurrent).TotalExits * 5)) * TileIndices) + 1))
Logged
Anonymous
Guest
« Reply #5 on: April 12, 2004, 06:36:00 PM »

Newbies, take notice!!!!!!!!

Plasma is a genius!  Smiley

Thanks dude, you rock \m/
Logged
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #6 on: April 13, 2004, 08:59:55 AM »

In any case this gives me the same error.

Not mine though. :*)  Got it from QBNZ's screenies challenge. :*)


Code:

'Raindrops keep falling on my head.....
'Bumpmapping+Plasma+Ripples
'BASA! Best compliment I got!
'by Jelly


1 IF F& = 0 THEN DIM Vpage%((128 ^ 2 + 4) \ 2), w1%(128, 128), w2%(128, 128), Lsin%(1024) ELSE IF F& = 1 THEN SCREEN 13 ELSE IF F& = 2 THEN GET (0, 0)-(127, 127), Vpage%(0) ELSE IF F& = 3 THEN DEF SEG = VARSEG(Vpage%(0)) ELSE IF (F& > 4 AND F& < 260 _
) THEN PALETTE F& - 4, 65536 * INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 128)) + 256 * INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 64)) + INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 32)) ELSE IF (F& > 259 AND F& < 516) THEN Lsin%(F& - 260) = SIN((F&  _
- 260) / 40) * 64 ELSE IF F& = 516 THEN RANDOMIZE TIMER ELSE IF F& > 516 THEN PUT (90, 40), Vpage%(0), PSET
2 F& = (F& + 1) AND &H7FFFFFFF
3 FOR y% = 1 TO 127
4 FOR x% = 0 TO 128
5 IF F& > 515 THEN IF (x% = 0 AND y% = 1) THEN offs% = VARPTR(Vpage%(2)) + 128 ELSE IF x% > 0 AND x% < 127 THEN offs% = offs% + 1 ELSE IF x% = 127 THEN offs% = offs% + 2
6 IF F& > 515 THEN IF ((F& AND 1) AND x% > 0 AND x% <= 127) THEN w2%(x%, y%) = ABS(((w1%(x% - 1, y%) + w1%(x% + 1, y%) + w1%(x%, y% + 1) + w1%(x%, y% - 1) + w1%(x% + 1, y% - 1) + w1%(x% - 1, y% - 1) + w1%(x% - 1, y% + 1) + w1%(x% + 1, y% + 1)) \ 4 - _
 w2%(x%, y%)) - ((w1%(x% - 1, y%) + w1%(x% + 1, y%) + w1%(x%, y% + 1) + w1%(x%, y% - 1) + w1%(x% + 1, y% - 1) + w1%(x% - 1, y% - 1) + w1%(x% - 1, y% + 1) + w1%(x% + 1, y% + 1)) \ 4 - w2%(x%, y%)) \ 256) ELSE IF (F& AND 1) = 0 AND x% > 127 AND y% =  _
127 THEN w1%(1 + INT(RND * 127), 1 + INT(RND * 127)) = 255 ELSE IF ((F& AND 1) = 0 AND x% > 0 AND x% <= 127) THEN POKE offs%, Lsin%(x% + ((w1%(x% - 1, y%) - w1%(x% + 1, y%))) \ 4 AND 255) + Lsin%(y% + ((w1%(x%, y% - 1) - w1%(x%, y% + 1))) \ 4 AND  _
255)
7 IF F& > 515 THEN IF ((F& AND 1) = 0 AND x% > 0 AND x% <= 127) THEN SWAP w2%(x%, y%), w1%(x%, y%)
8 NEXT x%, y%
9 IF INKEY$ = "" THEN 1

Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #7 on: April 13, 2004, 10:19:41 AM »

Quote from: "relsoft"
Code:

'Raindrops keep falling on my head.....
'Bumpmapping+Plasma+Ripples
'BASA! Best compliment I got!
'by Jelly


1 IF F& = 0 THEN DIM Vpage%((128 ^ 2 + 4) \ 2), w1%(128, 128), w2%(128, 128), Lsin%(1024) ELSE IF F& = 1 THEN SCREEN 13 ELSE IF F& = 2 THEN GET (0, 0)-(127, 127), Vpage%(0) ELSE IF F& = 3 THEN DEF SEG = VARSEG(Vpage%(0)) ELSE IF (F& > 4 AND F& < 260 _
) THEN PALETTE F& - 4, 65536 * INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 128)) + 256 * INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 64)) + INT(32 - 31 * SIN((F& - 4) * 3.14151693# / 32)) ELSE IF (F& > 259 AND F& < 516) THEN Lsin%(F& - 260) = SIN((F&  _
- 260) / 40) * 64 ELSE IF F& = 516 THEN RANDOMIZE TIMER ELSE IF F& > 516 THEN PUT (90, 40), Vpage%(0), PSET
2 F& = (F& + 1) AND &H7FFFFFFF
3 FOR y% = 1 TO 127
4 FOR x% = 0 TO 128
5 IF F& > 515 THEN IF (x% = 0 AND y% = 1) THEN offs% = VARPTR(Vpage%(2)) + 128 ELSE IF x% > 0 AND x% < 127 THEN offs% = offs% + 1 ELSE IF x% = 127 THEN offs% = offs% + 2
6 IF F& > 515 THEN IF ((F& AND 1) AND x% > 0 AND x% <= 127) THEN w2%(x%, y%) = ABS(((w1%(x% - 1, y%) + w1%(x% + 1, y%) + w1%(x%, y% + 1) + w1%(x%, y% - 1) + w1%(x% + 1, y% - 1) + w1%(x% - 1, y% - 1) + w1%(x% - 1, y% + 1) + w1%(x% + 1, y% + 1)) \ 4 - _
 w2%(x%, y%)) - ((w1%(x% - 1, y%) + w1%(x% + 1, y%) + w1%(x%, y% + 1) + w1%(x%, y% - 1) + w1%(x% + 1, y% - 1) + w1%(x% - 1, y% - 1) + w1%(x% - 1, y% + 1) + w1%(x% + 1, y% + 1)) \ 4 - w2%(x%, y%)) \ 256) ELSE IF (F& AND 1) = 0 AND x% > 127 AND y% =  _
127 THEN w1%(1 + INT(RND * 127), 1 + INT(RND * 127)) = 255 ELSE IF ((F& AND 1) = 0 AND x% > 0 AND x% <= 127) THEN POKE offs%, Lsin%(x% + ((w1%(x% - 1, y%) - w1%(x% + 1, y%))) \ 4 AND 255) + Lsin%(y% + ((w1%(x%, y% - 1) - w1%(x%, y% + 1))) \ 4 AND  _
255)
7 IF F& > 515 THEN IF ((F& AND 1) = 0 AND x% > 0 AND x% <= 127) THEN SWAP w2%(x%, y%), w1%(x%, y%)
8 NEXT x%, y%
9 IF INKEY$ = "" THEN 1


holey shizzle.




reminds me of this time I wrote a bunch of scripts for a MUD engine my friend was making... what a mind-job that was.
Logged

Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #8 on: April 14, 2004, 04:40:01 AM »

Quote from: "wizardlife"
holey shizzle.

reminds me of this time I wrote a bunch of scripts for a MUD engine my friend was making... what a mind-job that was.


No, :lol:  that was a nine-liner dude! :rotfl:
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!