Author Topic: Problem using VB Script  (Read 3008 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Problem using VB Script
« on: December 17, 2014, 09:49:13 am »
Okie

So I am writing a piece of script that uses both the Scripting.Dictionary object and the Scripting.FileSystemObject.

I have used the dictionary object before and have even had the filesystem object working in the current script, but now something has changed and it is no longer working.

My script for dictionary looks like this:

Set m_packageSpecificationList = CreateObject( "Scripting.Dictionary" )

where m_packageSpecificationList is a member variable of the class.

However, when I run this script I get "Type mismatch 'createObject', Line:235

This is kinda driving me crazy because I cannot see how this is different in any way from the script where it currently works perfectly.

Help! Thanks in advance Jays  :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem using VB Script
« Reply #1 on: December 17, 2014, 10:04:40 am »
I inserted that in a 3-liner and it worked with on issue. So it's likely some follow-up error you see. Try commenting parts and see when it vanishes/comes up again.

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Problem using VB Script
« Reply #2 on: December 17, 2014, 11:06:41 am »
Fantastic Q!

Turns out that little gem was PRECISELY what I needed.
What I had done was create a Constant called createObject (with a little C) and expected it to deal with it, given that the function has a BIG "C".

As soon as I got rid of the constant declaration, I was back in business!

Thanks a bunch

Jays :-)