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 |
|
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?
|
|
|
|
|
new fds bot, c++ php, perl
By: jnz on Sun, 09 July 2006 19:28
|
|
|
Re: new fds bot, c++ php, perl
By: Goztow on Sun, 09 July 2006 23:30
|
|
|
Re: new fds bot, c++ php, perl
By: light on Tue, 11 July 2006 04:21
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 04:09
|
|
|
Re: new fds bot, c++ php, perl
By: Goztow on Mon, 10 July 2006 04:14
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 08:29
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 11:03
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: Torn on Mon, 10 July 2006 13:21
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 10 July 2006 19:52
|
|
|
Re: new fds bot, c++ php, perl
By: Goztow on Tue, 11 July 2006 00:18
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 02:15
|
|
|
Re: new fds bot, c++ php, perl
By: dead6re on Tue, 11 July 2006 04:09
|
|
|
Re: new fds bot, c++ php, perl
By: Goztow on Tue, 11 July 2006 05:00
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 07:23
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 07:24
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 10:00
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 11 July 2006 10:07
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 12 July 2006 01:14
|
|
|
Re: new fds bot, c++ php, perl
By: dead6re on Wed, 12 July 2006 02:49
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 12 July 2006 10:37
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Thu, 13 July 2006 17:21
|
|
|
Re: new fds bot, c++ php, perl
By: dead6re on Fri, 14 July 2006 00:35
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Fri, 14 July 2006 06:03
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 15 July 2006 16:16
|
|
|
Re: new fds bot, c++ php, perl
By: cmatt42 on Sat, 15 July 2006 21:26
|
|
|
Re: new fds bot, c++ php, perl
By: dead6re on Sun, 16 July 2006 02:33
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 16 July 2006 10:32
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 13:45
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 19:23
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Mon, 17 July 2006 14:35
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 18 July 2006 09:16
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Tue, 18 July 2006 14:34
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Tue, 18 July 2006 16:33
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Tue, 18 July 2006 23:02
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 00:49
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 02:50
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 05:04
|
|
|
Re: new fds bot, c++ php, perl
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 06:04
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 09:38
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 12:30
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 13:10
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Wed, 19 July 2006 13:48
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Wed, 19 July 2006 17:01
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 11:36
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 22 July 2006 12:53
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 14:00
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 22 July 2006 14:50
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 16:12
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 22 July 2006 18:02
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 23 July 2006 07:01
|
|
|
Re: new fds bot, c++ php, perl
By: AmunRa on Sat, 29 July 2006 06:27
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 29 July 2006 08:12
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 29 July 2006 09:23
|
|
|
Re: new fds bot, c++ php, perl
By: Cat998 on Sat, 29 July 2006 10:30
|
|
|
Re: new fds bot, c++ php, perl
By: AmunRa on Sat, 29 July 2006 09:29
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sat, 29 July 2006 10:32
|
|
|
Re: new fds bot, c++ php, perl
By: jnz on Sun, 30 July 2006 14:14
|
Goto Forum:
Current Time: Thu Nov 28 03:59:28 MST 2024
Total time taken to generate the page: 0.01894 seconds
|