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
Bot Questions

 
Post new topic   Reply to topic Printable version
 View previous topic  make MERVBot 39 shut up Post :: Post grrr  View next topic  
Author Message
Stud^
Newbie


Age:40
Gender:Gender:Male
Joined: Nov 22 2003
Posts: 13
Offline

PostPosted: Fri Nov 28, 2003 5:20 am    Post subject: Bot Questions Reply to topic Reply with quote

Hi i have 2 quick questions

1. How Would I Make Merv Write Something to a text file
2. How could i make merv read something from a text file
thxs in advance icon_wink.gif
Back to top
View users profile Send private message Add User to Ignore List Send email
ExplodyThingy
Server Help Squatter


Age:38
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Fri Nov 28, 2003 9:54 am    Post subject: Reply to topic Reply with quote

writing
Code: Show/Hide

#include <fstream.h>
ofstream logfile("writing.txt",ios::app);
if(logfile)
{
   logfile << "hello " << me->name<<"\n";
}
logfile.close();

reading
Code: Show/Hide

#include <fstream.h>
ifstream cfgfile;
char line[256];
cfgfile.open("reading.txt");
while(cfgfile.getline(line,255))
{
   //Do your thang here.  Each line is progessively recorded into char line[256]
}
cfgfile.close();

_________________
There are no stupid question, but there are many inquisitive idiots.
Loot

Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun Nov 30, 2003 9:47 pm    Post subject: Reply to topic Reply with quote

readprivateprofilestring
writeprivateprofilestring

these are a little more complex but may help out better. Look them up on msdn .
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Dustpuppy
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 23 2003
Posts: 215
Location: England
Offline

PostPosted: Mon Dec 01, 2003 8:01 pm    Post subject: Reply to topic Reply with quote

Less complex but they write to .inis
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Dustpuppy
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 23 2003
Posts: 215
Location: England
Offline

PostPosted: Mon Dec 01, 2003 8:01 pm    Post subject: Reply to topic Reply with quote

Less complex but they write to .inis
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
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: 41 page(s) served in previous 5 minutes.

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