Arrays - I think

BlitzPlus Forums/BlitzPlus Beginners Area/Arrays - I think

acolite246(Posted 2008) [#1]
Hi another time!
Is there a way to make a list that has an identifier alternative to 1,2,3,4,5?

Let me rephrase that:

Can I, for a multiplayer game, use playerIDs as the identifier in the list?

Thanks in advance


Beaker(Posted 2008) [#2]
Arrays have to use unique continuous numbers. You can create a different type of list using Types. BlitzMax TMaps would be ideal. They use a binary tree for quick insert/find.


acolite246(Posted 2008) [#3]
So there is no way to do so in Blitz Plus?


Beaker(Posted 2008) [#4]
Can you not just hold them in a Type and search thru the list for the correct playerID? How many players do you think you will have?

If you really need to speed things up then you can write a binary tree system again using Types.


acolite246(Posted 2008) [#5]
Thanks. I am only looking for 8 players per server.


Ross C(Posted 2008) [#6]
String searching should be plenty fast then. Use Beakers idea with types.