Hi everyone!
Short version:
How do I load predefined entries (much of them!) into an array? What format does the file need to be?
Long version:
After being able to create a heap of random stars I now want to give them individual names. Each instance has its private variable "name", awaiting to be filled.
I planned doing this with an array, that in turn I fill from a prepopulated list (textfile for instance). The problem: "Load from file" doesn't work OR does not work the way I though it would.
I have a starnames.ini/txt with the following content:
5653 Felis
1947 Eridani
6649 Chitra
7801 Liu Xiu
1954 Andromedae
3504 Fornacis
7245 Felis[/code:1l8hgza7]
After filling the array with this file I print the array into a text-element, which promptly displays: "0". Nothing else.
(Printing into the textfield is done by a loop "for i = 1 to Array.SizeY which loops the following: set text to Array(global('counter'), 1) and global('counter')++)
So obviously I cant simply load a textfile into an array. I filled the array with some entries by hand and then used "save to file" just to see what structure it would have, only to get some unreadable hickup of chars and stuff.
Can someone please help me on this? I found nothing by searching the forum for keywords "array" (which returned an error by the way [you can't search at the moment], probably too much hits), "file array", "load from file" and so on.
Best regards,
Noel