|
| Author |
Message |
Addict Not Yet a God

Joined: 21 Jan 2004 Posts: 473
   
|
Posted: Sat Jan 29, 2005 5:56 am Post subject: |
|
|
Well today I switched my $msn object to $tcs->{msn}. Here's what i've done:
| Code: | | use MSN;<br />our $tcs = {};<br />$tcs->{msn} = new MSN( 'Handle' => $tcs->{settings}->{info}->{handler}, 'Password' => $tcs->{settings}->{info}->{password}); |
Here is the error I get..
| Quote: | | Can't call method "do_one_loop" on an undefined value at ./bot.pl line 566. |
I think that's where the problem is... I could be wrong..
This is making me fustrated.. Somone please help!!  |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Sat Jan 29, 2005 7:03 am Post subject: |
|
|
| Well you're setting $tcs to an empty hash, so there will be no settings and therefore no handle or password. You should check for errors higher than the one you listed. |
|
| Back to top |
|
 |
Addict Not Yet a God

Joined: 21 Jan 2004 Posts: 473
   
|
Posted: Sat Jan 29, 2005 7:24 am Post subject: |
|
|
| Code: | | use MSN;<br /><br />our $tcs = {};<br /><br /> $tcs->{settings} = do "./config/main.dat" or warn "Something went wrong when loading \"\$tcs\"! ";<br /><br />$tcs->{msn} = new MSN( 'Handle' => $tcs->{settings}->{info}->{handler}, 'Password' => $tcs->{settings}->{info}->{password});<br /><br />my $run = 1;<br /><br />while( $run ){<br /><br /> $tcs->{msn}->do_one_loop();<br /><br />} |
Edit: I do "use Data::Dumper;" at the top, so I am dumping properly. |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Sat Jan 29, 2005 7:33 am Post subject: |
|
|
You're not connecting to MSN?
| Code: | | 'Handle' => $tcs->{settings}->{info}->{handler} |
handler? don't you mean handle?
Again you should give us all the errors you're getting, not just the last one. |
|
| Back to top |
|
 |
Addict Not Yet a God

Joined: 21 Jan 2004 Posts: 473
   
|
Posted: Sat Jan 29, 2005 7:35 am Post subject: |
|
|
Okay. Sorry about that.
It connects, calls me, sends the welcome message, gets to the loop and crashs.
It's not a problem with the way my hash is built cause I looked and it's all set up properly. :unsure: |
|
| Back to top |
|
 |
|