-
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!
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
er.. cant you just do:
Player(0) = Player(1)
u can just do that as long as the two variables are of the same type.
im using that in my game with types - and it works :)
im not sure if thats waht you wnat though..
------------------
cintel rules :p
www.cintelsoftware.co.uk
-
Oh yes, thanks alot!
As I remember it didn't work last time I tried this... maybe my mistake ;)
-Thanks again (You'll get my game for free ;) ).
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.