field, global, const in types are only for declaration, not for initialisation!
mypages:pages[50] is an initialisation no deklaration
now the full source with all bugs corrected ( where several others in as well )
Type book Field mypages:pages[50] End Type
mypages:pages[50] is an initialisation no deklaration
Type book Field mypages:pages[] method new() mypages = new pages[50] end method End Type
now the full source with all bugs corrected ( where several others in as well )
Strict Graphics 640,480 Type pages Field _x:Int Field _y:Int End Type Type book Field mypages:pages[] method new() mypages = new pages[50] end method End Type Global mybooks:book = new book Repeat Cls mybooks.mypages[0]._x = 1 DrawText(mybooks.mypages[0]._x, 50, 50) Flip FlushMem Until KeyDown(KEY_ESCAPE)