Accessing a type within a type

BlitzMax Forums/BlitzMax Beginners Area/Accessing a type within a type

Type moose
  Field x:Int = 0
End Type

Type spoon
  Field my:moose
End Type

<b>mySpoon:Spoon = new Spoon
mySpoon.my = new Moose
mySpoon.my.x = 1</b>

As for the other example
Strict
Graphics 640,480
Type pages
  Field _x:Int = 0
  Field _y:Int = 0
End Type

Type book
  Field mypages:pages[50]
End Type

Global mybooks:book = <b>new book</b>

Repeat
  Cls
<b>  mybooks.mypages[0] = new page</b>
  mybooks.mypages[0]._x = 1

  DrawText(mybooks.mypages[0]._x, 50, 50)

  Flip
  FlushMem
Until KeyDown(KEY_ESCAPE)
Hope it helped.

This is actually really quite confusing. :(
Most (all?) of your "mistakes" seem to be linked to creational problems, that is you forget to create objects.

Also, traditionally class names are in singular, as it makes code more easily readable by humans. (The compiler ofcourse, couldn't care less).