User Control Panel
Advertisements

HELP US, HELP YOU!

MSN object problem?

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Review
View unanswered posts
Author Message
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Sat Jan 29, 2005 5:56 am    Post subject: Reply with quote

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!! Sad
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Sat Jan 29, 2005 7:03 am    Post subject: Reply with quote

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
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Sat Jan 29, 2005 7:24 am    Post subject: Reply with quote

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
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Sat Jan 29, 2005 7:33 am    Post subject: Reply with quote

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
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Sat Jan 29, 2005 7:35 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Review All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group