Has anyone ever gotten an "Expression too complex" error when trying to compile? If so, how do I get around it??????? This is not a joke I swear
Posts: 6,419
Threads: 74
Joined: Mar 2002
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" That helps when answering
Posts: 1,752
Threads: 21
Joined: Jun 2002
Yes, I've seen that before. Just break up the line it chokes on. (Sometimes you have to use temporary variables.)
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? :???:
Posts: 1,752
Threads: 21
Joined: Jun 2002
Break this line down:
Code: TileOffset = VARPTR(Tiles((Map(RoomCurrent, ThisTile + (Room(RoomCurrent).TotalExits * 5)) * TileIndices) + 1))
Newbies, take notice!!!!!!!!
Plasma is a genius!
Thanks dude, you rock \m/
Posts: 3,288
Threads: 167
Joined: Nov 2001
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
Posts: 720
Threads: 46
Joined: Oct 2001
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.
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.
Posts: 1,774
Threads: 62
Joined: Aug 2003
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:
|