Why does Obama hate me?

Post your own tutorials, guides and demos.

Post » Fri Feb 06, 2009 2:37 am

Okay I wanted to make a simple example of using a flatfile for online highscores which are displayed ingame. And yes it works. The only thing I can't get to work is the reloading of the score file, so the highscores will be updated after you submitted your new score. It keeps crashing when I'm trying to do that. The score will still be submitted and appear when you restart it though.

I was thinking it had something to do with the DOWNLOAD object, but probably I'm overlooking something else. Damn I'm pretty tired right now.

Maybe somebody has the wisdom to show me what's going wrong here...

Damn the cap is slightly too big. I put it on Willhostforfood:

obama_005_debug3z.cap
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Feb 06, 2009 5:07 am

Could be a couple things, there might be an issue reading the updated flatfile, you might try using multiple files, or you might be downloading something Construct wont handle.
I tend to think it's the latter.
Dunno check the server to see how its saving, and appending files. I have no idea if Construct cares if the files are ANSI, or binary, you might check that too.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Fri Feb 06, 2009 12:27 pm

Well it's a simple txt file. And Construct has no problem reading it on startup. But when you submit a new score, the layout will be changed for a few seconds telling you that it was submitted. Then it will go back again to the first layout where it does the exact same thing as on startup. But this time it crashes. Sometimes you can even see that the highscore list was updated again, but you still get an error message.

I also made a simple CAP where it would just download that txt file and when you hit a key it would download it again. There seems to be no problem at all.

I'm still a little puzzled. Well I will try to figure it out later today when I'm in the mood again. :lol:
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Feb 07, 2009 6:46 pm

Actually it was just a FOR EACH ORDERED event which crashed the cap when it ran more than 1 time. Well I used another method to order the scores and now everything works fine.

If you're interested in nonsense:
Click Obama... 0.9b
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Feb 07, 2009 6:53 pm

Crashes are bugs, did you put this on the tracker? (problems are usually tended to faster on the tracker since that's where we expect to see bugs reported)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest