Help with arrays inside types
BlitzPlus Forums/BlitzPlus Programming/Help with arrays inside types
| ||
Sorry, I can't seem to find any information (yet) on how to put arrays inside types. I am using the old 2d Blitz - I know that you can do it, but I can't remember how. I would appreciate it if someone could tell me how to do this. Thank you very much. Does anyone know if it possible to put multidimensional arrays inside types yet? The GFXCaps function on my version of Blitz no longer works either - the editor simply doesn't recognise it as a Blitz Command. However it is still featured in the manual. Help! Rico |
| ||
Use the '[' ']' instead of '(' ')' ? |
| ||
Arrays in Types: Use the [] instead of (): Dim bob(2) bob(1)=1 bob(2)=2 Type fred Field x,y Field jim[1],jim[2] End Type GFXCaps: There are a few commands like this. They're just bugs and will probably be fixed soon. |
| ||
Or solve it by using two types. I'll give an example with "player information" and "item information that the player has", e.g diamonds. If you know the player id in type 1, you can mutate data in type 2. Type playerInformation Field whichItemsItook Field id Field entity End type ; item\whichPlayerID correspondents to playerInformation\id Type item Field whichPlayerID Field whichItemID End type |
| ||
Excellent - now I can get back to my program. Thanks to everyone for the help. |