Page 1 of 1 1
Topic Options
#158002 - 2006-02-28 07:38 PM ENDIF without IF!
j95661 Offline
Getting the hang of it

Registered: 2001-02-27
Posts: 84
Loc: sacramento,ca usa
I feel stupid posting this but here goes. I keep getting a ENDIF without IF! error in my script. I have verified that the correct number of IF statements and their corresponding endif's are correct. I can't seem to find where or how this error message is coming from. Is there a tool that I can run against this script to possibly point me in the right direction.

I have spent many hours trying to fix this and I'm not getting anywhere.

Jason
_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)

Top
#158003 - 2006-02-28 07:43 PM Re: ENDIF without IF!
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Well 2 can count better than one. Post your script and I´m sure there is someone who can help you out...
_________________________
Co


Top
#158004 - 2006-02-28 07:47 PM Re: ENDIF without IF!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
You may have a double-quote issue as well - check all your quoted strings (especially the ones in IF statements) to make sure they're all properly closed-off.
Top
#158005 - 2006-02-28 07:51 PM Re: ENDIF without IF!
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Try out this cool script from Glenn

Script sanity checker
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB14&Number=149937

There is a link to download the script as it's too big to post fully on the board. Works great.
 

Top
#158006 - 2006-02-28 09:41 PM Re: ENDIF without IF!
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Hmm.. it will detect mismatched quotes, but doesn't check for balanced IFs.. sounds like a possible enhancement is in the works!

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

Top
#158007 - 2006-03-01 02:17 AM Re: ENDIF without IF!
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Yeah I know, but better than nothing. Might also show him other possible issues.

Can also look at using MCA's tools KIXSTRIP 4.x

Scripting@Wanadoo.nl
http://home.wanadoo.nl/scripting/index.htm

 
The last version he created though was for KiXtart 4.22 but should work fairly well for most things.

Kixtart 4.22 script analyzer tool (using keyword table of KiXtart 4.22 release)
http://home.wanadoo.nl/scripting/download/kixstrip422.exe

Top
#158008 - 2006-03-01 04:39 AM Re: ENDIF without IF!
j95661 Offline
Getting the hang of it

Registered: 2001-02-27
Posts: 84
Loc: sacramento,ca usa
thanks for the info, I ran the Sanity.kix script and didnt find any errors.. except my vars that were not declared, and I have several double quotes that stretch for several lines.

I did find out though what my issue was.. I had to comment out each piece of code until my issue went away. Basically I had transplanted some vbscript functions that I usually use into kix... below is my code

Do While Not $fsr.AtEndOfStream
Dim $DN, $SUBNET
$RL = $fsr.ReadLine
$TmpArray = Split($RL,"*",-1)
$ArrVal1 = $TmpArray[0]
$ArrVal2 = $TmpArray[1]
$RC = BuildD($ObjDictionary,$ArrVal1, $ArrVal2)
Loop

well.... dont I feel like an idiot.. no such thing as Do While in Kix.. Heck it works now thats whats important. removed the Do and bang.. el worko..

thanks for the input.

Jason
_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)

Top
#158009 - 2006-03-01 11:57 AM Re: ENDIF without IF!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
lol.
and as both do and while are supported commands, kixtart didn't even complain about that.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 483 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

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