EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Using && in perl ? (https://www.eqemulator.org/forums/showthread.php?t=25506)

kayen85 06-19-2008 10:14 PM

Using && in perl ?
 
Is there any thing that could cause the && function not to work. the || function works fine as far as just about everything else I try. I am out of ideas on why the function will cause any quest not to work period.

Here is just a simple example I wrote to test it.

Quote:

sub EVENT_SAY
{
if ($text=~/hail/i)
{
$JA = int 6;
$JO = int 7;
}

if {{$JO == 7}&&{$JA == 6}}
{
quest::say("Test Worked!");
}

}
Thanks

Andrew80k 06-19-2008 10:23 PM

It should be

Code:

if (($JO==7)&&($JA==6))
You're using brackets instead of parantheses.

kayen85 06-19-2008 10:39 PM

Thanks
 
Wow, thank you so much. I was pulling my hair out over that. The tiny font on most websites made the () and {} look the same in all the examples.

Andrew80k 06-19-2008 11:10 PM

hehe. Yep, I've noticed that too. Have fun.

trevius 06-20-2008 02:42 AM

If you use Firefox, you can always hold down CTRL and use the scroll on your mouse to increase or decrease font size for any website. Comes in quite handy when you need it.

Theeper 06-20-2008 10:06 AM

Quote:

If you use Firefox, you can always hold down CTRL and use the scroll on your mouse to increase or decrease font size for any website.
This works in IE too.

Angelox 06-20-2008 10:22 AM

This is a great Perl editor for windows
http://enginsite.com/Perl.htm
It's free, and has a registered version with more features.
Once you get the hang of it, it will show you where you screwed up with your typos (has built in Syntax Check, Expressions Tester,etc).


All times are GMT -4. The time now is 04:51 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.