The Daily Click ::. Forums ::. Klik Coding Help ::. Check for INI files in TGF2
 

Post Reply  Post Oekaki 
 

Posted By Message

Ando



Registered
  08/04/2006
Points
  100
22nd November, 2006 at 13:40:30 -

Hello, all. First post here. Whee!
Anyway, I be using TGF2 (the demo version), and I'm trying to figure out how to make the program check for an INI file. What I want is more or less a "Look for INI file. If found, load it. If not, take user to another frame."

Thanks in advance.
And now, I test and see what kind of code this board uses.
Either this is italic [i]or this is.[/i] I'll find out after hitting "Post".

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
22nd November, 2006 at 13:51:40 -

Use the file extension to check whether a file exists or not.

Welcome btw.

 
Old member (~2004-2007).

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
22nd November, 2006 at 13:52:01 -

Well, now you know.

As for the INI question, you could check to see if the file exists using the File object (I think it can do that, anyway). However, it's probably easier to just check against a value that you know isn't going to be 0 in the INI file by loading it into a counter/alt value - if it doesn't exist, you'll just get a zero instead.

 
http://www.davidn.co.nr - Games, music, living in America

Ando



Registered
  08/04/2006
Points
  100
22nd November, 2006 at 14:11:23 -

Well that was blaringly simple. I used the INI method (the File Extension didn't seem to be doing much; maybe I'm just using it wrong), and it worked like a charm. Thanks, guys.

 
n/a

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
22nd November, 2006 at 14:12:30 -

Aw I wanted first post! Yeah the site tends to use <html> code throughout instead of [bbcode], so you can use it in articles and downloads etc. and it'll work like that.

Oh and if you're new, (and this hasn't been said to you already!) - Welcome to TDC

 
http://www.SilverNova.co.uk


DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
22nd November, 2006 at 14:32:03 -

"(and this hasn't been said to you already!)"
"Welcome btw. "

<_<

 
Old member (~2004-2007).

Ando



Registered
  08/04/2006
Points
  100
22nd November, 2006 at 15:08:50 -

Heh, I thought the same thing.
But thanks, SuperNova.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click