I have been trying to trace an error in a script with some 1000 lines and I either come up with no error or error on line 13 of calledstuff5.kix with invalid method function call, missing ')'
then I look at the script and it only has writeline(1,'text'+@crlf) on it. clearly this error is bogus.
yea. and to finally solve the issue was to retokenize the short script again. oh, and the error didn't come from the tokenized script. or the script that called it but from the script that used udfs in it. but, not on the use line. not even in the same script block. after exits and endfunctions.
I have no idea how that tokenized script had anything to do with that line, but sure enough, the error is gone now.
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
If you tokenize with one version and run with another, there's a VERY HIGH probability that you will get the strange error you've encountered. I discussed this with Ruud a while ago. He said that any 6.x version should work, but 5.x and 6.x would fail, but I've seen the issue even between minor 6.x revisions.
Glenn
_________________________ Actually I am a Rocket Scientist!
oh, I learned that. 4.5 and 4.6 are not compatible.
but, I was having this issue with 4.62 opening a script tokenized with 4.62
anyways, most likely the tokenized script just somehow got corrupted I guess. and since there seems to be no checks for validity/integrity, it just bogs out in an uncontrolled manner.
I've seen those little critters .. more than enough of them.
In the best case it is caused by an overseen missing + in a string concatenation or some missing " or 's. When it gets weird it is in the line(s) before the thrown one, or even when the bugger sits in the udf itself somewhere completely different.
I ended up removing the script from production due to this issue. note that before ppl started getting the error, it was in use without a hickup for a month.
and now another script. worked fine for months. first error ) expected on line 411. I was like wth... this is insane. ran the script again and have, error expected ) on line 210.
this is freaking stupid.
found a plausible cause of the error on line 199... which obviously is completely unconnected to either line errored about, and obviously the script has no missing closing parenthesis.
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
I host an RDP server here where Jooel was/is developing Kix.Net along with a few others. He still has access to the server and the KGen development tool is available on the server. KGen would make quick work of identifying any mismatched pair of objects (quotes, parens, and paired functions like If/EndIf).
You can download KGen from my web site.
Glenn
_________________________ Actually I am a Rocket Scientist!