Arrays - I think
BlitzPlus Forums/BlitzPlus Beginners Area/Arrays - I think
| ||
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 |
| ||
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. |
| ||
So there is no way to do so in Blitz Plus? |
| ||
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. |
| ||
Thanks. I am only looking for 8 players per server. |
| ||
String searching should be plenty fast then. Use Beakers idea with types. |