How to define these data structures on BlitzMax
BlitzMax Forums/BlitzMax Programming/How to define these data structures on BlitzMax
| ||
Hi, I'm currently working on the definition of data structures for an Rpg. I would like to get to something like. Player[i].X:int Player[i].Y:int Player[i].Name:String Etc... How can this be done with BlitzMax? |
| ||
You can use a Type to store your information.Type TPlayer Field X:Int Field Y:Int Field Name:String End Type Local player:TPlayer = New TPlayer player.Name = "Fred" Local players:TPlayer[0] players :+ [player] ... or ... Local players:TList = New TList players.AddLast(player) |
| ||
Thanks alot man. Was quite a fast feedback. |