Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Bug with OpenToWrite()?

Author
Message
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 14th May 2012 03:34
I was doing some testing with creating data files and observed that when using OpenToWrite() with no optional append parameter, that instead of defaulting to overwrite as the documentation says, it's defaulting to append.

In addition using the append parameter set to 1, appears to be putting it in overwrite mode (the opposite of what's expected).

Setting the parameter to 0 (overwrite) works as expected.

Can anyone else confirm this in their findings?

I'm currently using 1073, although I don't know if it was behaving this way in earlier versions.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th May 2012 17:58
On what platform is this happening? I can't replicate it on Windows. Are you closing the file with CloseFile() after modifying it?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th May 2012 00:14
It's working ok for me on Windows, my debug log always starts by overwriting the previous one.

Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 15th May 2012 02:56 Edited at: 15th May 2012 03:24
I did some more testing to make sure I was still getting the same results as last night...

That being said, it is still defaulting to append for me if no optional parameter is specified.

However, today when I tested, the optional parameter was working correctly when specified for both append and overwrite.

So I'll have to assume I was too tired and confused the parameters last night.

But, it's still defaulting to append, which is not a big deal in my opinion.

I could have sworn that it was overwriting when I used a 1 last night though.


EDIT: This was on Windows
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 14:51
The biggest problem with programming at night is that generally speaking I should be asleep. It's hard to get anything done at night without a LOT of caffeine and NO BEER...

I wish I was just writing games during the day when I can think clearly

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 17:27 Edited at: 15th May 2012 17:28
Many years back, in my Intelsat days, the programmer/db/and friends crowd would go across the street for beer and schmoozing on Thursday nights.

Being a responsible being (most of the time, anyway), if I'd had too much to drink, I'd go back to work and program until I could type straight. Lots of backspace action.

And I never had to redo any of the code the next day. Some of it was even truly inspiring stuff. It's amazing what a little mind loosening can do to your coding.

Cheers,
Ancient Lady
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 17:31
It has the opposite effect on me I'm afraid. I used to work through the night as a blacksmith working on adrenaline and tequila but when coding? If I have more than a couple of beverages I start creating spiders and bees instead of butterflies.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 17:47
I haven't tried coding while drinking Tequila (my preferred poison). It might be interesting.

Cheers,
Ancient Lady
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 17:49
I look forward to seeing the results

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 17:51
I'll have to come up with something just to try it.

Just what I need, another challenge/distraction from getting my current game done.

Oh well, the things we do in the name of science.

Cheers,
Ancient Lady
polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 15th May 2012 18:38
I love coding & drinking,

I get all my best and fastest coding done that way, although understanding the code the next day is a nightmare,

Blackberry App Development & ZX Spectrum Game Development.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 18:43
I've already come up with an appropriate idea. I'll need to wait for the weekend to start on it (I try to avoid intoxication during the week, it interrupts my sleep).

And I just finished the entire design in my head (occupational hazard)!

Now I need to come up with the graphics (sober for that part).

This is going to be fun!

Cheers,
Ancient Lady
polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 15th May 2012 18:45
Have fun with the gfx, I just cannot draw anything, I'm terrible at gfx, heh

Blackberry App Development & ZX Spectrum Game Development.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 18:54
...what have I started...

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 15th May 2012 19:01
@baxslash: you can be the barman, I'll have a vodka and coke,

Blackberry App Development & ZX Spectrum Game Development.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 19:05
Quote: "@baxslash: you can be the barman, I'll have a vodka and coke"

My days behind the bar are long behind me! I prefer the other side these days

Hope the grumpy jedi doesn't use the force on us for filling his thread with alcoholic programming nonsense. Sorry GJ!!! It's my fault

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 15th May 2012 19:08
I think a drunken programming room is needed, lol

Blackberry App Development & ZX Spectrum Game Development.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 19:27
Grumpy Jedi, I, too, apologize for letting the thread get run away with.

Sometimes the ideas just flow too easily.

Cheers,
Ancient Lady
polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 15th May 2012 19:32 Edited at: 15th May 2012 19:33
Quote: "Sometimes the ideas just flow too easily."


Just like the alcohol, hehehe


EDIT: Yeah, sorry Jedi, they started it,

Blackberry App Development & ZX Spectrum Game Development.

Login to post a reply

Server time is: 2024-05-04 14:07:17
Your offset time is: 2024-05-04 14:07:17