Loading a Saved hash table.

For questions about using Classic.

Post » Fri Mar 06, 2009 4:09 am

Im using hash tables to load in values for my project. There is an auto save feature that will automatically update the table's save file but I have a problem loading in the saved keys when I load a file on the start of the game when the hash table is loaded none of the keys get loaded in with it. Maybe im just confused about how this should work but I thought that if I saved the keys then I would be able to load them back in. or maybe Im just doing it wrong :(.

My basic syntax is

-on function load -> load hash table
--If key exists ->set variable here

but the key is never loaded because the has table will not load...Ive looked in the debugger and there are no keys in the hash table object....
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Fri Mar 06, 2009 8:12 am

I don't think the hash table will load that fast for its key to be instantly accessible... give it some delay and try again?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Mar 06, 2009 11:48 am

Even if it doesn't load instantly it should still load eventually. I cant ever access the keys in the hash table they never load no matter what...
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Fri Mar 06, 2009 12:40 pm

I just tried a small tester and it worked for me. Where's this autosave feature? Or do you mean your own autosave code?
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Fri Mar 06, 2009 12:58 pm

Any load action will always load instantly for the next action unless specified; sounds like a bug to me. If you don't mind, if you can reproduce it or something, put it on the tracker and we'll look into it. Thanks.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests