ok, first we have this patch i've emerged and validated working ok:
irpgbot.v3.1.2+johm+chschu.patch
after that patch is setup and trying to emerge the tournament patch
the following happens:
[@zebday:~/irpg]$ patch -p1 < irpgbot.v3.1.2+tournament.patch
patching file .irpg.conf
Hunk #1 succeeded at 259 (offset 20 lines).
patching file bot.v3.1.2.pl
Hunk #1 succeeded at 135 (offset 4 lines).
Hunk #2 FAILED at 1180.
Hunk #3 succeeded at 1912 with fuzz 1 (offset -49 lines).
Hunk #4 succeeded at 2689 (offset 315 lines).
1 out of 4 hunks FAILED -- saving rejects to file bot.v3.1.2.pl.rej
ofcource we want to see the rejects
so let's
[@zebday:~/irpg]$ cat bot.v3.1.2.pl.rej
***************
*** 1173,1178 ****
}
# quest type 2 awards are handled in moveplayers()
}
if ($rpreport && $rpreport%36000==0) { # 10 hours
my @u = sort { $rps{$b}{level} <=> $rps{$a}{level} ||
$rps{$a}{next} <=> $rps{$b}{next} } keys(%rps);
--- 1180,1191 ----
}
# quest type 2 awards are handled in moveplayers()
}
+ #tournaments
+ if ($opts{tournament} && time() > $tournamenttime) {
+ if (!@tournament) { tournament(); }
+ else { tournament_battle(); }
+ }
+ #end tournaments
if ($rpreport && $rpreport%36000==0) { # 10 hours
my @u = sort { $rps{$b}{level} <=> $rps{$a}{level} ||
$rps{$a}{next} <=> $rps{$b}{next} } keys(%rps);
giving this information. i tried to implent the #tournaments
....
#end tournaments
where it logicly should be
before this
if ($rpreport && $rpreport%36000==0) { # 10 hours
my @u = sort { $rps{$b}{level} <=> $rps{$a}{level} ||
$rps{$a}{next} <=> $rps{$b}{next} } keys(%rps);
which makes it look like this
}
# quest type 2 awards are handled in moveplayers()
}
#tournaments
if ($opts{tournament} && time() > $tournamenttime) {
if (!@tournament) { tournament(); }
else { tournament_battle(); }
}
#end tournaments
if ($rpreport && $rpreport%36000==0) { # 10 hours
my @u = sort { $rps{$b}{level} <=> $rps{$a}{level} ||
$rps{$a}{next} <=> $rps{$b}{next} } keys(%rps);
~~~
when this is pasted likewise, i get the following error:
Global symbol "$k" requires explicit package name at ./bot.v3.1.2.pl line 1919.
Global symbol "$k" requires explicit package name at ./bot.v3.1.2.pl line 1920.
BEGIN not safe after errors--compilation aborted at ./bot.v3.1.2.pl line 2028.
:) thanks.