Fox
Feb 14th, 2000, 08:07 PM
Is there a way to copy a Type? I have a player type and wanted to copy it around, but I don't know which size it is. Look what I mean:
-
Type tPlayer
X as Long
Y as Long
DC as Long
End Type
Dim SrcPlayer(3) as Long 'Here are the original players stored
Dim Player(10) as tPlayer 'And these are used in the game
CopyMemory Player(0), SrcPlayer(1), SizeOf(tPlayer)
'As you can see I try to add a new player and want to copy the whole values but I don't know the size of tPlayer.
-
Any help will be great!
------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.
-
Type tPlayer
X as Long
Y as Long
DC as Long
End Type
Dim SrcPlayer(3) as Long 'Here are the original players stored
Dim Player(10) as tPlayer 'And these are used in the game
CopyMemory Player(0), SrcPlayer(1), SizeOf(tPlayer)
'As you can see I try to add a new player and want to copy the whole values but I don't know the size of tPlayer.
-
Any help will be great!
------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.