|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Sep 21, 2007 9:47 pm
Invalid call/procedure... |
The script in question is taken from here.
The situation is this - I'm having an invalid call/procedure on line 20, character 3 in the vbs script, the line that reads:
strHTML = mid(strHTML, intX, intZ)
It states that the "mid" is an invalid call/procedure. Any suggestions on how to fix this? Thanks!
Charneus |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Tue Sep 25, 2007 11:26 am |
I just made a simple script on my desktop called test.vbs with the following in wscript.echo mid("hello",3,1) double clicked it and got a message box with the letter l in it which confirms that mid is a valid vbs function.
Do the same and see what result you get. |
|
_________________ Taz :) |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Sep 25, 2007 8:02 pm |
Oh, I've no doubt that mid is a valid vbs function. The problem is, if I try to run the script, it tells me that it isn't for some reason. *shrug* I don't know. I do know it worked before. Just wasn't sure if something had possibly changed within topmud that created this error.
Charneus |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Sep 26, 2007 12:10 am |
Something may well have changed on your computer and vbs may be messed up and that is why I suggested running it directly from a vbs file on the desktop rather than through zMUD. If it fails direct then you never know you might get a little more information and if it doesn't fail at all it may point to a corrupt mud file.
|
|
_________________ Taz :) |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Sep 26, 2007 4:29 pm |
Ah. Will have to do that once I get to use the computer in question. :) I'll let you know by Saturday what the result is. Thanks for the suggestion. :)
Charneus |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Sep 30, 2007 9:51 pm |
Actually, it's in the vbs script itself. While mid is a valid vbs function, there appears to be something wrong with the mid(strHTML, intX, intZ) string... don't know what because it worked before. *sigh* I've tried this on three different computers, three different installs of zMUD.
Charneus |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Mon Oct 01, 2007 12:50 pm |
Ok so I followed the instuctions for importing the scripts to the letter and I got exactly the same error as you did for the topmudsites one. I'll have a look and see what I can make of it.
EDIT: http://www.topmudsites.com/index.shtml no longer shows any results but most particularly the reason that error message is coming up is because intX is being set to 0 which is not a valid integer to start from for the function mid. |
|
_________________ Taz :) |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Mon Oct 01, 2007 1:16 pm Required Changes |
Ok so what changes need to be made to the vbs to account for the changes at topmudsites?
Code: |
objHTTP.Open "GET", "http://www.topmudsites.com/index.shtml", "FALSE"
to
objHTTP.Open "GET", "http://www.topmudsites.com/", "FALSE"
and
intY = instr(strHTML, "Next Update:")
to
intY = instr(strHTML, "</body>") |
Of course if topmudsites decides to change things again then the script will once again need to be changed. |
|
_________________ Taz :) |
|
|
|
|
|