Qbasicnews.com
You've got to be kidding me... :P - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: You've got to be kidding me... :P (/thread-3720.html)



You've got to be kidding me... :P - Anonymous - 04-12-2004

Has anyone ever gotten an "Expression too complex" error when trying to compile? If so, how do I get around it??????? Tongue This is not a joke I swear Wink


You've got to be kidding me... :P - na_th_an - 04-13-2004

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 Big Grin


You've got to be kidding me... :P - Plasma - 04-13-2004

Yes, I've seen that before. Just break up the line it chokes on. (Sometimes you have to use temporary variables.)


You've got to be kidding me... :P - Anonymous - 04-13-2004

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? :???:


You've got to be kidding me... :P - Plasma - 04-13-2004

Break this line down:
Code:
TileOffset = VARPTR(Tiles((Map(RoomCurrent, ThisTile + (Room(RoomCurrent).TotalExits * 5)) * TileIndices) + 1))



You've got to be kidding me... :P - Anonymous - 04-13-2004

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

Plasma is a genius! Smile

Thanks dude, you rock \m/


You've got to be kidding me... :P - relsoft - 04-13-2004

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



You've got to be kidding me... :P - wizardlife - 04-13-2004

Quote:
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. [Image: eek.gif]




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.


You've got to be kidding me... :P - Dr_Davenstein - 04-14-2004

Quote: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: