Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Reading INIs

 
Post new topic   Reply to topic Printable version
 View previous topic  Rank plugin Post :: Post 8ball plugin.  View next topic  
Author Message
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Aug 23, 2003 5:58 pm    Post subject: Reading INIs Reply to topic Reply with quote

Can someone outline how to access an INI file from a DLL? Thanks.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sun Aug 24, 2003 11:20 am    Post subject: Reply to topic Reply with quote

You could use fopen() and fgets()
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Aug 24, 2003 1:59 pm    Post subject: Reply to topic Reply with quote

Uhhh...
Pretend I'm an idiot icon_biggrin.gif
How do you use them?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sun Aug 24, 2003 3:56 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide

//<edit>
#include <stdio.h>
//</edit>

readExample()
{
  FILE *conf;
  char line[256];
  int i, j;

  //Open file for reading
  conf = fopen("settings.ini", "r");
  if (!conf) return;

  //Get the first line
  i = fgets(line, 256, conf);
  if (i > 0) //Make sure there is something on it
  {
    sscanf(line, "%d", &j); //Convert to integer
  }

  //Close the file
  fclose(conf);
}

There's probably a class with merv bot that can do .ini files, but I wouldn't know which file it was in.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 199 page(s) served in previous 5 minutes.

phpBB Created this page in 0.583879 seconds : 29 queries executed (82.9%): GZIP compression disabled