Nested Types

Blitz3D Forums/Blitz3D Beginners Area/Nested Types

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

hmm.. yeah, did a little further digging and came up with whats erroring.. the code is about 10 pages long, so I'll use another example. I'm beginning to think its to do with how i'm using buffers rather than types..

for fish.seacreature = each seacreature
  fishie=createimage(100,100)
  setbuffer imagebuffer(fishie)
  ... draw the fish ...
  for parts.animals = each animals
    a$=parts\creature$
    b$=parts\imagepath$
    if a$ = "fish" then
      c=LoadImage(b$)
      Drawimage c,0,0
      End If
    Next
  SetBuffer BackBuffer()
  Drawimage fishie,100,100
  Flip
  Freeimage fishie
  Next


Now using that "example", as soon as it finds the first "part" which goes on a fish, and draws it, then no more fishies (in the ..draw fish here.. part) will be drawn.. let alone fish parts. ;) Is it impossible to LOADIMAGE while using an ImageBuffer? I could understand that, but then how come extracting the inside FOR loop out into a function, solves the problem? The ImageBuffer() is still active.

+BlackD