Page 1 of 2 12>
Topic Options
#193067 - 2009-03-23 04:47 PM ENDSELECT without SELECT
Solid Offline
Fresh Scripter

Registered: 2009-02-13
Posts: 15
Loc: The Netherland
Hallo,

This time I have a funny error, when I was testing my script I got the error ENDSELECT without SELECT line 384. The funny thing about it is that I have a SELECT on line 75.
But somehow he keeps on forgetting it.
When I delete 100 lines the error doesn’t so up and the script works.
Is there a maximum lines that can be between SELECT AND ENDSELECT?

Top
#193072 - 2009-03-23 05:11 PM Re: ENDSELECT without SELECT [Re: Solid]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Not that I'm aware of but that doesn't mean their isn't one. More than likely you have an error in your code would be my guess.

Please post your current script and we can review it to see if there is an error in code or missing element or something similar.

Top
#193073 - 2009-03-23 05:14 PM Re: ENDSELECT without SELECT [Re: Solid]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Nope there is no maximum number of lines that can be between Select and EndSelect.

This will happen when there is a something missing in one of the lines like a ( or ) or a quote. If it works after deleting the lines then most likely you also deleted the line that has a quote are bracket missing.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#193074 - 2009-03-23 05:23 PM Re: ENDSELECT without SELECT [Re: Solid]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi Solid,

like Mart said
look for an open " or ' these need to be paired.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#193075 - 2009-03-23 05:26 PM Re: ENDSELECT without SELECT [Re: Solid]
Solid Offline
Fresh Scripter

Registered: 2009-02-13
Posts: 15
Loc: The Netherland
Thank very much for your input, after that was cleared up.
I started reading the script again (7 times) before found out I missed a endif .
Pretty weird for an ENDSELECT without SELECT error when I was missing a ENDIF.

Top
#193077 - 2009-03-23 05:50 PM Re: ENDSELECT without SELECT [Re: Solid]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
That is because the Select was open, then the If was open, then the Select was closed.. the interpreter threw the error because it expected an EndIf before the EndSelect.

It's all about the sequence..

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#193081 - 2009-03-23 07:44 PM Re: ENDSELECT without SELECT [Re: Solid]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
If you use this script that Glenn wrote it will greatly enhance the ability to locate these type of issues.
Sanity() - Performs a "sanity check" on KiX scripts

Top
#193083 - 2009-03-23 07:54 PM Re: ENDSELECT without SELECT [Re: NTDOC]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
yeah, but that only handles mismatched quotes and parens.. maybe time its time to upgrade my sanity? ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#193085 - 2009-03-23 07:56 PM Re: ENDSELECT without SELECT [Re: Glenn Barnas]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
LOL - Maybe. Well in any case. I removed the PostPrep code and re-posted the current version in it's entirety. Previous PostPrep version added too much text to the post that caused it to exceed the post limit size.
Top
#193088 - 2009-03-23 08:28 PM Re: ENDSELECT without SELECT [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, the postprep code (at least any which I have tried to) can't be copy&pasted from this board.
either ppl are using bad versions of it, or the board is doing something to the post.
but, removal of postprep from codes is currently a good thing.
_________________________
!

download KiXnet

Top
#193090 - 2009-03-23 08:45 PM Re: ENDSELECT without SELECT [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
I have no problem posting with and copying using the PostPrep and PPCL tools that I've posted in the Advanced forum. I use the same logic/UDF on my site without any issues. You can tell if it's the latest postprep if you View Source and look at the first line of the PostPrep data - it should show something like "< !-- PostPreped by PPCL.kix Version 2.1.0.0 -->".

The only board issue is the "almost 64K" storage limit.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#193094 - 2009-03-23 09:55 PM Re: ENDSELECT without SELECT [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, don't see that many postpreped code by you, so can't tell ;\)

but some others do post with postprep or some rip-off and the result is unusable.
_________________________
!

download KiXnet

Top
#193095 - 2009-03-23 10:32 PM Re: ENDSELECT without SELECT [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hmmm okay, here is a small example from Glenn's code.
In preview mode it does not break long lines.





Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')


Dim $Locale, $LocaleAllowed, $RC

;Check if the computer is running an ENGLISH version of Windows and if not then quit.
$Locale = ReadValue('HKU\.DEFAULT\Control Panel\International','Locale')
$LocaleAllowed = Split('00000409|00011009|00001809','|')
If AScan ($LocaleAllowed, $Locale)>=0
; OS is English so continue...
Else
$RC = MessageBox('Your Operating System does not appear to be English. This fix was only designed for Windows XP English'+@CRLF+'This repair utility will now quit.', 'OS Language Check', 4112)
Quit 10
EndIf



Top
#193097 - 2009-03-23 10:34 PM Re: ENDSELECT without SELECT [Re: NTDOC]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Source says: PostPreped by postprep.kxw Version 2.1.0.2
Top
#193098 - 2009-03-23 10:36 PM Re: ENDSELECT without SELECT [Re: NTDOC]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Copy / Paste maintained the formatting for me.
Top
#193099 - 2009-03-23 10:36 PM Re: ENDSELECT without SELECT [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
to notepad, only single long line appeared.
_________________________
!

download KiXnet

Top
#193100 - 2009-03-23 10:37 PM Re: ENDSELECT without SELECT [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Formatting worked for me... using FF.
_________________________
(... better days ahead)

Top
#193101 - 2009-03-23 10:38 PM Re: ENDSELECT without SELECT [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well let me check from IE but copy/paste from FireFox 3.0.7 works correctly.
Top
#193102 - 2009-03-23 10:44 PM Re: ENDSELECT without SELECT [Re: NTDOC]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Confirmed that this version of PP does not copy correctly with IE7 but it does with FireFox 3.0.7

Formatting is removed in IE

Top
#193104 - 2009-03-24 12:07 AM Re: ENDSELECT without SELECT [Re: NTDOC]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
PPCL and PostPrep both use the same Kix2Htm UDF. In fact, both utilities share about 85% of the same code - PPCL has a block of code that handles the command-line arguments, while PostPrep has the form and form handling code instead. All the rest are compiled from the same code.

The postings in the Vault were done with PPCL 2.2.0.0 and I can copy/paste into notepad from IE6, IE7, and FF. I think the core difference is that I post using HTML, not HTML+UBB. This was discussed at length last year.

If you post with PostPrep, you MUST post in HTML ONLY format. Enabling UBB support strips off the CRLF between the text. There is no issue with PostPrep if you use it correctly. ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.113 seconds in which 0.027 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org