Trying to understand.
I can not figure out why this first script works as it should, and the second one does not.
Code:
sub EVENT_SAY { Code:
sub EVENT_SAY { If the item is not equipped the client->Message will just list -1 for the itemid for that slot. The elsif statement is never reached. Any help would be greatly appreciated. |
Code:
sub EVENT_SAY { |
“and” is not a valid bareword in Perl. Use && instead. Also, smart-matching is better if you predefine the arrays so it's much easier to understand what the random numbers are.
|
Indeed, "and" is instead a valid logical operator. You had me scratchin' my head trying to figure out what you meant, but I assume perl -c barfed on it because I placed the scalar values meant to be an array within brackets rather than parentheses. Serves me right for not bouncing it against Perl.
Code:
($headid ~~ (147587,147580,147573,147566) and ... Code:
my @headpieces = (147587,147580,147573,147566); Maybe something along the lines of: Code:
%HoH = ( Code:
my %elementshash = map { $_ => 1 } @headpieces; |
Thank you very much for the help! I understand now. I will post what im making soon as i finish it later today. And my server is always public if you want to stop by. Omen I :)
|
I wrote this late at night, pretty sure it will work out, though my comments -may- be off a little, maybe someone can correct me on any wrong points. We're all here to learn.
Code:
%HoH = ( |
All times are GMT -4. The time now is 10:59 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.