File formats

For questions about using Classic.

Post » Wed Oct 13, 2010 5:07 am

Is it possible to read a text file into a hash table, and if so, what format is used? I tried saving a hash table but the format it came out in wasn't human readable in a text editor (although the key names were, the values were not).
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Wed Oct 13, 2010 6:03 am

IIRC the hash table saves out values after running them through a hashing algorithm so they are not human readable. What are you trying to accomplish so maybe we can give you some alternatives. Judging by what you asked for I would say the .ini object is a good start for you.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed Oct 13, 2010 6:16 am

Well, I'm trying to have a hash table that has set values by me on load. An array is not suitable for the task I'll be using it for. I can do that using the actions in the engine, but that's a bit annoying as the number of keys grow. However, it seems I'll have to do it that way
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Wed Oct 13, 2010 9:11 am

you could definitely use the ini object and then build the hash table from the data read from there.

You'll have to save and load "manually", that is, going one by one using events.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests