Gossamer Forum
Home : Products : DBMan : Customization :

What's wrong here?

Quote Reply
What's wrong here?
Here's the code:
Code:
$j=1
while ($j<$rec{'RateVideo'}) {
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++j;
}
while ($j<=10)
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++j;
}
print qq|<small><br>Audio:<br></small>|;
$k=1
while ($k<$rec{'RateAudio'}) {
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++k;
}
while ($k<=10)
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++k;
}

And here's the error:
Quote:
Reason: syntax error at ./dvd.pl line 874, near "++"
syntax error at ./dvd.pl line 877, near ")
print"

Thanks,
Blake
Quote Reply
Re: What's wrong here? In reply to
I see two places where you forgot the {.

Code:
while ($j<=10) {

while ($k<=10) {

Of course, I may have forgotten it in the code I gave you. I'll go look.

Yep. I did. I went back and changed it.
------------------
JPD







[This message has been edited by JPDeni (edited August 27, 1999).]
Quote Reply
Re: What's wrong here? In reply to
Now what's wrong?

Code:
Code:
$j=1
while ($j<$rec{'RateVideo'}) {
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++j;
}
while ($j<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++j;
}
print qq|<small><br>Audio:<br></small>|;
$k=1
while ($k<$rec{'RateAudio'}) {
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++k;
}
while ($k<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++k;
}
print qq|<small><br>Extras:<br></small>|;
$l=1
while ($l<$rec{'RateExtras'}) {
print qq|<img width="10" height="15" alt="$rec{'RateExtras'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++l;
}
while ($l<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateExtras'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++l;
}
print qq|<small><br>Price:<br></small>|;
$m=1
while ($m<$rec{'RatePrice'}) {
print qq|<img width="10" height="15" alt="$rec{'RatePrice'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++m;
}
while ($m<=10) {
print qq|<img width="10" height="15" alt="$rec{'RatePrice'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++m;
}
print qq|<small><br>Overall:</small><br>|;
$n=1
while ($n<$rec{'RateOverall'}) {
print qq|<img width="10" height="15" alt="$rec{'RateOverall'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++n;
}
while ($n<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateOverall'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++n;
}

Error:
Quote:
Reason: syntax error at ./dvd.pl line 874, near "++"
syntax error at ./dvd.pl line 884, near "++"

Thanks,
Blake
Quote Reply
Re: What's wrong here? In reply to
Each line must have a semicolon after it.

$j=1;

$k=1;

$l=1;

$m=1;

$n=1;

I probably screwed that up, too.

Also, I left out a $ with the variable name.

You need to have

++$j;

++$k;

++$l;

++$m;

++$n;
------------------
JPD


On second thought, here's what I know has no syntax errors:

Code:
$j=1;
while ($j<$rec{'RateVideo'}) {
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++$j;
}
while ($j<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateVideo'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++$j;
}
print qq|<small><br>Audio:<br></small>|;
$k=1;
while ($k<$rec{'RateAudio'}) {
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++$k;
}
while ($k<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateAudio'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++$k;
}
print qq|<small><br>Extras:<br></small>|;
$l=1;
while ($l<$rec{'RateExtras'}) {
print qq|<img width="10" height="15" alt="$rec{'RateExtras'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++$l;
}
while ($l<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateExtras'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++$l;
}
print qq|<small><br>Price:<br></small>|;
$m=1;
while ($m<$rec{'RatePrice'}) {
print qq|<img width="10" height="15" alt="$rec{'RatePrice'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++$m;
}
while ($m<=10) {
print qq|<img width="10" height="15" alt="$rec{'RatePrice'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++$m;
}
print qq|<small><br>Overall:</small><br>|;
$n=1;
while ($n<$rec{'RateOverall'}) {
print qq|<img width="10" height="15" alt="$rec{'RateOverall'}" src="http://www.outermost.net/test/images/sq3.gif">|;
++$n;
}
while ($n<=10) {
print qq|<img width="10" height="15" alt="$rec{'RateOverall'}" src="http://www.outermost.net/test/images/sq4.gif">|;
++$n;
}




[This message has been edited by JPDeni (edited August 27, 1999).]

[This message has been edited by JPDeni (edited August 27, 1999).]
Quote Reply
Re: What's wrong here? In reply to
Now I get this error:
Code:
if ($rec{'AmazSound'}) {
print qq|<a class="info" href="http://www.amazon.com/exec/obidos/ASIN/$rec{'AmazSound'}/anoutermosexperi"><small>Get
the Soundtrack from Amazon.com</small></a><br>
<img src="http://www.outermost.net/test/images/blackline.gif" width="110" height="1"><br>|;
}

Do I need to close off the above code ($j=1 code) or something?

-Blake

[This message has been edited by blakex (edited August 27, 1999).]
Quote Reply
Re: What's wrong here? In reply to
There's no syntax error in the code you posted. It must be earlier in the script.


------------------
JPD





Quote Reply
Re: What's wrong here? In reply to
Here's the full code from the ending of the $j=1 code to the ending of the 'if {' code that I'm having problems with:

[removed code and added link to dvd.pl below]

[This message has been edited by blakex (edited August 27, 1999).]
Quote Reply
Re: What's wrong here? In reply to
Here's my dvd.pl (html.pl) if you would like to peruse it.

http://www.outermost.net/dvd/dvd_pl.txt

Above file is current as of: 11:22 PDT.
Quote Reply
Re: What's wrong here? In reply to
One error I found was

if {$rec{'AmazDVD'}) {

should be

if ($rec{'AmazDVD'}) {

Another one at

if {$rec{'AmazBook'}) {

should be

if ($rec{'AmazBook'}) {

When I fixed those two things in your file, I got no more syntax errors.


------------------
JPD





Quote Reply
Re: What's wrong here? In reply to
Thanks, you're a lifesaver. Two errors, so small make such a big difference.

Working fine now.

-Blake