Problem with Types ... Guru needed please!

Blitz3D Forums/Blitz3D Programming/Problem with Types ... Guru needed please!

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Aaaaarggghhhhh!
Help me please... !

After I thought I got it with types - I must admit that I *don't*

This is my Problem:

I have some characters moving around my gamespace (animMeshes)
with bones animating...

I want to be able to record their movement in space
using a simple event system, that stores a characters
x,y,z, rotation and some other data on a "stack".
Each character has its own stack.

This is what I would like to have... in a very short version :D

First I tried types within types like this:

type character
   field id$
   ...
   eventstack.evnt
end type


Then I figured out, that they obviously dont work...
I used a workaround that I found somewhere on the net
but that was to complicated/confusing in the end...

--> So I came to this idea:
I simply use an array of types and every character gets
one of these arrayentries as their eventlist, when I create it
So I can do something like this to loop through all events:

for eventlist(myCharacter\eventlist_id).evnt = each evnt
   ...
next


And I tried out this little code to see if it is possible at all
Type evnt
	Field a
	Field b
End Type

Dim eventlist.evnt(5)

For i = 1 To 5

	eventlist(i) = New evnt

	eventlist(i)\a = i
	eventlist(i)\b = i * 10	
		
Next

For i = 1 To 5

	Print "Eventlist " + i + ":"
	
	For eventlist.evnt(i) = Each evnt
		Print eventlist(i)\a
		Print eventlist(i)\b
	Next

	Print "---"

Next

WaitKey()


The program should output this:
(At least I think it should...)

Eventlist 1:
1
10
---
Eventlist 2:
2
20
---
Eventlist 3:
3
30
--- etc...

But it outputs:

Eventlist 1:
1
10
2
20
3
30
4
40
5
50
--- etc.

Am I doing something wrong? If yes, what?

I have also read this in the Language Reference:

"You can create variables or arrays of custom types using a '.' type tag followed by the type name. For example:

Global mine.MyType Dim all_mine.MyType( 100 ) "

But how do I access this array then...


******* Please help me folks! *******
It's probably just a little typo in my code... But I dont
get it...

And sorry, if this has been asked 1000 times before...
No search at the moment...

Nice day, and thanks for your attention

hed