!!

Guests can now post!

Welcome to Intelligent Answers.  As a guest, you are now able to post a question, subject to getting through our spam-bot filters.  However, if you want to answer any questions, you will need to register.  Thanks for visting!  (BTW - guests cannot post links, and if you post spam, we will block your IP and report you to every spam protection site we can find - we work hard to keep this site spam free for the benefit and enjoyment of our members!)

Author Topic: Why do I get this message when I try to use tthe 'Search' function in IA?  (Read 752 times)

Offline P-Kasso2

  • Awaiting inspiration.
  • PK unique
  • University Councillor
  • *
  • Thank You
  • -Given: 53
  • -Receive: 163
  • Posts: 12220
  • Helpfulness: 213
  • January 2011 prize-quiz winner.

I wasn't 'searching' for anything lewd or porny.
Far from it. I was just checking to see an earlier question posted about why lobsters turn red when cooked.

This what I got...

Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/intelli7/public_html/Sources/SearchAPI-Custom.php on line 112

The same happened when I just searched for the word 'red'. Pretty innocuous stuff, yesno? Maybe it's a temporary glitch and it might be working OK by tomorrow. But, for now, is there a reason why this is happening?

PS What does " 'continue' not in the 'loop' or 'switch' context" actually mean? I feel quite in the loop myself.

"I live in hope"

Offline siasl

  • Founder member who you can't insult as I'm too ignorant.
  • Administrator
  • Chancellor
  • *****
  • Thank You
  • -Given: 122
  • -Receive: 85
  • Posts: 5306
  • Helpfulness: 129
  • Intelligence is soluble in alcohol <hic>
The Continue statement is used in code to break out of particular structures in the code, namely loops and switch blocks. The loop is exactly what it sounds like - do something a few times and then move on. The switch block is basically a set of code blocks where the code executes one or more of them depending on the value of a variable.

The Continue statement exits those two structures of it is hit. Not sure why you're seeing that error, it would imply that someone has updated the code to a version that has incorrect syntax, which I find unlikely.

As an example, here is a simple loop with a continue statement, followed by the expected output...

Code:
For i=1 to 10 {
   Print i
   If (i>4)
      Continue
   Endif
} Next i
Print ("end")

Output:
1
2
3
4
5
End

Offline P-Kasso2

  • Awaiting inspiration.
  • PK unique
  • University Councillor
  • *
  • Thank You
  • -Given: 53
  • -Receive: 163
  • Posts: 12220
  • Helpfulness: 213
  • January 2011 prize-quiz winner.
The Continue statement is used in code to break out of particular structures in the code, namely loops and switch blocks. The loop is exactly what it sounds like - do something a few times and then move on. The switch block is basically a set of code blocks where the code executes one or more of them depending on the value of a variable.

The Continue statement exits those two structures of it is hit. Not sure why you're seeing that error, it would imply that someone has updated the code to a version that has incorrect syntax, which I find unlikely.

As an example, here is a simple loop with a continue statement, followed by the expected output...

Code:
For i=1 to 10 {
   Print i
   If (i>4)
      Continue
   Endif
} Next i
Print ("end")

Output:
1
2
3
4
5
End

Good answer Siasl.   Shame most of it goes straight over my low-tech head!  Is there anything I can do to be able to get into the 'Search' mode again? Or is it totally hopeless?  Forever?
"I live in hope"

Offline siasl

  • Founder member who you can't insult as I'm too ignorant.
  • Administrator
  • Chancellor
  • *****
  • Thank You
  • -Given: 122
  • -Receive: 85
  • Posts: 5306
  • Helpfulness: 129
  • Intelligence is soluble in alcohol <hic>
Not entirely sure- it does it for me, too. Perhaps Duff knows, as he generally is the one that tinkers

Offline Duffield1

  • Founder member and wannabe deity.
  • Administrator
  • Marie Curie
  • *****
  • Thank You
  • -Given: 61
  • -Receive: 34
  • Posts: 2480
  • Helpfulness: 65
  • I ain't nothing but a hound dawg...
Sadly not - it is probably some kind of glitch in the current version of SMF. 

Offline P-Kasso2

  • Awaiting inspiration.
  • PK unique
  • University Councillor
  • *
  • Thank You
  • -Given: 53
  • -Receive: 163
  • Posts: 12220
  • Helpfulness: 213
  • January 2011 prize-quiz winner.
It's a shame if this problem with accessing IA's Search function really is a permanent lock out because I (and probably others) often use 'Search' - and to be locked out is a big disadvantage.

I remember moaning about the old Lycos 'search' function being worse than useless at times but at least it used to let me use it!
« Last Edit: 25 January, 2018, 08:16:48 PM by P-Kasso2 »
"I live in hope"