Posted: Mon Jul 04, 2005 10:09 pm Post subject: Syntax Error With While Loop
If I run my bot I get
Code:
Missing right curly or square bracket at bot.pl line 72, at end of line
syntax error at bot.pl line 72, at EOF
Execution of bot.pl aborted due to compilation errors.
Press any key to continue . . .
Line 72 is:
Code:
while(1) {
Here is the coding in that general area:
Code:
#Sign into AIM
$oscar->signon($screenname, $password);
while(1) {
$oscar->do_one_loop();
}
It has a closing curly bracket for the while loop. I don't know why I get the syntax error. Any ideas?
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Mon Jul 04, 2005 11:04 pm Post subject:
I'm not positive and have no perl on this computer, but you might need a space after while. Otherwise check the rest of your code too, those errors have a tendancy to crop up somewhere unrelated to the cuase. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
sub signon_done {
my($oscar) = @_;
my $buddyprofile = "$screenname was made from scratch by $master";
$oscar->set_info ($buddyprofile);
$oscar->commit_buddylist();
print "\n\n$screenname has finished signing into AIM\n\n";
Hmm, this subroutine doesn't have a closing bracket