Save/Load array

For questions about using Classic.

Post » Mon Nov 23, 2009 5:50 pm

Hi,
I have problems.
How to save and load the two-dimensional array from a file.
as seen from the example of all is saved, but loaded 0??? :cry:

[url:1xk4q4th]http://slil.ru/28242934[/url:1xk4q4th]
B
1
G
3
Posts: 5
Reputation: 835

Post » Mon Nov 23, 2009 8:14 pm

You do have the problem because of an inconsistency. Almost everything in Construct is one-based. And it makes sense when you think of array sizes. So your arrays need to be set up as 18x13x1, not 18x13x0. An array logically has one dimension on z, if you use only x and y. The problem is that Construct allows you to set it to zero when using it in ram, but as soon as you save it to a file, the one-based-rule applies and the file seems to get corrupted.

To cut things short: set the z-dimensions of your arrays to one and everything will work fine :)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Nov 24, 2009 6:02 am

Alles funktioniert, ich danke Ihnen :P
B
1
G
3
Posts: 5
Reputation: 835

Post » Tue Nov 24, 2009 8:48 am

??????????, ?? ????? :mrgreen:
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests