User Control Panel
Advertisements

HELP US, HELP YOU!

Error'ed Code, Help.

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Review
View unanswered posts
Author Message
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Jan 08, 2005 12:19 pm    Post subject: Reply with quote

Hey, This piece of code is out of dvondrake's Azilda,

Im not sure what is wrong with it. Its the Attack.pl file

Code:
<br />if ($msg =~ /^attack (.*)$/) {<br />     $atkdam += 1;<br />     $atker = $username;<br />     open(ATKDAM, ">" , "./azilda/dam/$1.txt");<br />     print(ATKDAM "$atkdam");<br />     close(ATKDAM);<br />     &send($self,"Attacking $1 for 2 damage!");<br />     $msn->call("$1","ATTENTION: $atker has attacked you on Azilda RPG for 2 damage!");<br />open (CHDED, "/azilda/dam/$1.txt");<br />$chded = <CHDED>;<br />close(CHDED);<br />if($chded eq 100)<br /> {<br />  foreach my $id (keys %{$msn->{Socks}})<br />{    <br /> next unless defined $msn->{Socks}->{$id}<br />        and $msn->{Socks}->{$id}->{Type} eq 'SB';<br /> $msn->{Socks}->{$id}->sendmsg("(I)Azilda RPG: $1 has just been killed by $atker !!");<br />}<br />    $castgp += 25; <br />open(CASTGP, ">" , "./azilda/gp/$username.txt");<br />     print(CASTGP "$castgp");<br />     close(CASTGP);<br />&send($self, "You get 25 GP for killing $1 !", "$username");<br />$deddam = 0;<br />open(DEDDAM, ">" , "./azilda/gp/$username.txt");<br />     print(DEDDAM "$deddam");<br />     close(DEDDAM);<br />}<br />  }<br />else {<br />&send($self, "$1 is not dead yet...");<br />}<br />}<br /> }


Please help Me. Wink
}
Back to top
Basically
Newbie
Newbie


Joined: 03 Jan 2005
Posts: 21
Location: Almere, The Netherlands
Reputation: 16.7Reputation: 16.7

PostPosted: Sat Jan 08, 2005 1:08 pm    Post subject: Reply with quote

Code:
open(ATKDAM, ">" , "./azilda/dam/$1.txt");

I think it should be:
Code:
open(ATKDAM, ">>./azilda/dam/$1.txt");


Code:
if($chded eq 100)

Should be:
Code:
if ($chded == 100) #if numeric<br /><br />or <br /><br />if ($chded eq '100') #if not numeric<br />


Just a very quick review (I'm sure I missed some errors), also be more specific about the errors you receive.
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Jan 08, 2005 1:12 pm    Post subject: Reply with quote

Im not sure what is wrong with it. When i Run the command ( !attack martinored@hotmail.com ) It Does nothing.

On DOS it give's no error. But it doesnt work.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Sat Jan 08, 2005 1:15 pm    Post subject: Reply with quote

Why not post in the Azilda Topic, where the creator may help you. This forum is for code that you made, not released code which doesn't work for you. I'll go get Dvondrake to reply to it in there.
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Jan 08, 2005 1:18 pm    Post subject: Reply with quote

Ok Darkmonkey, Sorry I didnt know what Forum to post it in.

The old topic was full, so if it was a new topic i thought it would be easier to read.
Thank's for the tip :unsure:
Back to top
dvondrake
Not Yet a God
Not Yet a God


Joined: 11 Mar 2004
Posts: 314
Location: El Paso, Texas
Reputation: 32.6Reputation: 32.6Reputation: 32.6

PostPosted: Sat Jan 08, 2005 10:11 pm    Post subject: Reply with quote

Doesn't really seem like anything's wrong. Then again, that's the old one I did when I was a newb. The new version that I'm working on will work definately.

I'm thinking you didn't download the right one. Try the one nearest the bottom. It might have a fix for it.
If you're using morphious, sorry, but there isn't a fully-fixed version of ARPG for it. New version will have a download for sub's, and elsif's in morph and maya style.
The morphious version did have a lot of bugs fixed before the maya one, but then I just stuck to maya. :/

I'm guessing that the new one will be done... erm... soon. Maybe a week or two.
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