Home » Technical Support » Other » new fds bot, c++ php, perl
Re: new fds bot, c++ php, perl [message #208554 is a reply to message #207285] |
Mon, 17 July 2006 13:45 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/gosticon 0000.jpeg) |
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma:
|
General (3 Stars) |
|
|
i have run into another problem, i have programmed my bot so far to get the date, open the file ssaow_<month>-<day>-<year>.txt read it delete it, print it out. it works when i put the file there myself. but not when i put it in the server dir why is this?
here is some code:
bool find_new_text(string &line)
{
string st;
string day, mon, year;
get_date(day, mon, year);
st.assign("ssaow_"+mon+"-"+day+"-"+year+".txt");
ifstream file;
file.open(st.c_str(), ios::in);
char buf[50];
if(file.is_open())
{
file.getline(buf, 50);
line.assign(buf);
file.close();
unlink(st.c_str());
return 1;
}
else
{
return 0;
}
return 0;
}
void pre_parse()
{
string find;
while(1)
{
if(find_new_text(find))
{
parse(find);
find.clear();
}
}
}
void parse(string line)
{
stringstream strs;
int f = 11;
while(f != line.size())
{
strs << line[f++];
}
cout << endl << strs.str();
}
parse() at the moment removes 11 chars from the beggining of the string and prints it.
pre_parse() is the function called;
the debug error i get is:
Debug Assertion Failed
Program: C:\Westwood\RenegadeFDS\Server\bot.exe
File: .\string
Line: 1508
Expression: string subscript out of range
why would it do this if i create the file manually and it works?
|
|
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
new fds bot, c++ php, perl
By: jnz on Sun, 09 July 2006 19:28
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Goztow on Sun, 09 July 2006 23:30
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: light on Tue, 11 July 2006 04:21
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 04:09
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Goztow on Mon, 10 July 2006 04:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 08:29
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 11:03
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Torn on Mon, 10 July 2006 13:21
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 19:52
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Goztow on Tue, 11 July 2006 00:18
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 02:15
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: dead6re on Tue, 11 July 2006 04:09
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Goztow on Tue, 11 July 2006 05:00
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 07:23
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 07:24
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 10:00
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 10:07
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 12 July 2006 01:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: dead6re on Wed, 12 July 2006 02:49
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 12 July 2006 10:37
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Thu, 13 July 2006 17:21
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: dead6re on Fri, 14 July 2006 00:35
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Fri, 14 July 2006 06:03
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 15 July 2006 16:16
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: cmatt42 on Sat, 15 July 2006 21:26
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: dead6re on Sun, 16 July 2006 02:33
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 16 July 2006 10:32
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 13:45
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 19:23
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 14:35
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 18 July 2006 09:16
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Tue, 18 July 2006 14:34
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 18 July 2006 16:33
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Tue, 18 July 2006 23:02
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 00:49
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 02:50
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 05:04
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 06:04
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 09:38
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 12:30
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 13:10
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 13:48
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 17:01
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 11:36
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 22 July 2006 12:53
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 14:00
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 22 July 2006 14:50
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 16:12
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 18:02
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 23 July 2006 07:01
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: AmunRa on Sat, 29 July 2006 06:27
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 29 July 2006 08:12
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 29 July 2006 09:23
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 29 July 2006 10:30
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: AmunRa on Sat, 29 July 2006 09:29
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 29 July 2006 10:32
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 30 July 2006 14:14
|
Goto Forum:
Current Time: Tue Aug 27 06:03:58 MST 2024
Total time taken to generate the page: 0.01363 seconds
|