3

I am facing the following error:

Microsoft VBScript runtime error '800a0005' 
Invalid procedure call or argument: 'left' 
/scheduler/App.asp, line 16 

The line is:

point1 = left(point0,i-1)

This code works perfectly in another server, but now on another server it is showing this error. I can guess it has to do with system or IIS settings or may be something else but its nothing with code (as its works fine in another server).

Guido Gautier
  • 1,237
  • 9
  • 13
uncle_scrooge
  • 409
  • 1
  • 5
  • 28

2 Answers2

6

If i is equal to zero then this will call Left() with -1 as the length parameter. This will result in an Invalid procedure call or argument error. Verify that i >= 0.

Polynomial
  • 3,656
  • 23
  • 36
1

Just experienced this problem myself - a script running seamlessly for many months suddenly collapsed with this error. It seems that the scripting engine falls over itself for whatever reason and string functions cease being able to handle in-function calculations.

I appreciate it's been quite a while since this question was asked, but in case anyone encounters this in the future...

Replace

point1 = left(point0, i-1)

with

j = i-1
point1 = left(point0, j)

... and it will work.

Alternatively, simply re-boot the server (unfortunately, simply re-starting the WWW service won't fix it).

Cognicom
  • 11
  • 1