dupa

Author Topic: Hal error 13  (Read 7274 times)

seduar

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Hal error 13
« on: July 06, 2006, 10:04:48 pm »
Can anybody help me on this one.

HalScript Error 13 on Line 2644 in Column 8: Type mismatch: 'CDbl'
The File "Cprograms FilesabawareUltrahal Assitant 6HalScript.DBG"  has been saved with the current Script being used for debugging purposes.

I Got this error since i placed the Loneliness 4 pluggin from scratch, I've been trying to ask him, but i guess he is not around at the moment.

Any Help somebody, If any one of you knows what is 'CDbl' can you tell me please.

[:D]
 

onthecuttingedge2005

  • Guest
Hal error 13
« Reply #1 on: July 07, 2006, 08:16:36 pm »
quote:
Originally posted by seduar

Can anybody help me on this one.

HalScript Error 13 on Line 2644 in Column 8: Type mismatch: 'CDbl'
The File "Cprograms FilesabawareUltrahal Assitant 6HalScript.DBG"  has been saved with the current Script being used for debugging purposes.

I Got this error since i placed the Loneliness 4 pluggin from scratch, I've been trying to ask him, but i guess he is not around at the moment.

Any Help somebody, If any one of you knows what is 'CDbl' can you tell me please.

[:D]



VBScript CDbl Function
Returns an expression that has been converted to a Variant of subtype Double.

Syntax: VBScript CDbl Function
CDbl(expression)

Arguments: VBScript CDbl Function
expression

Any valid expression.

Remarks: VBScript CDbl Function
In general, you can document your code using the subtype conversion functions to show that the result of some operation should be expressed as a particular data type rather than the default data type. For example, use CDbl or CSng to force double-precision or single-precision arithmetic in cases where currency or integer arithmetic normally would occur.

Use the CDbl function to provide internationally aware conversions from any other data type to a Double subtype. For example, different decimal separators and thousands separators are properly recognized depending on the locale setting of your system.

This example uses the CDbl function to convert an expression to a Double:

Dim MyCurr, MyDouble

MyCurr = CCur(234.456784)              ' MyCurr is a Currency (234.4567).

MyDouble = CDbl(MyCurr * 8.2 * 0.01)   ' Convert result to a Double (19.2254576)

If you open up the HalScript.DBG in the Ultra Hal Assistant 6 folder with a line editor you can spot the problem on line 2644


Explanations of Type Mismatch:

Troubleshooting Code 800A000D - Type mismatch
Error 800A000D is straightforward to solve.  The secret is to read the Windows Script Error message carefully, then locate the line number with the Type Mismatch.

Introduction to error Code 800A000D
This runtime error, 800A000D occurs when you execute a VBScript.  My suggestion is that there is a VBScript statement that does not understand a keyword you are using in your script.  Alternatively, you may not be running the script as an ordinary user and not as an Administrator.

The Symptoms you get 800A000D
The script does not execute as you hoped, instead you get a WSH error message.  One possibility is that you are using a WSH object or method that has been misspelt.

Chuck kindly wrote in saying that another cause maybe that you are logged on as ordinary user, and not an Administrator.

The Cause of Code 800A000D
Your VBScript contains an illegal method, probably due to a typing mistake, an extra letter.  Look for a clue opposite the phrase Error: Type mismatch....  In particular, double check the spelling of your objects.

Note 1:  Source: Microsoft VBScript runtime error.  This is not a syntax error in the sense of a missing bracket, more a typo in the keyword mentioned in the Error: line of your WSH Message.

Note 2:  Error: Type mismatch: 'Join'.  Chuck says this could mean that you are logged on as an ordinary user and not an administrator.

The Solution
Check the spelling of your variables and methods.  Look for clues particularly the Line: number and check the Char: references.  In the example it is Line: 14  Char: 1.  In this instance the:  'Error: Type mismatch: 'CreateeObject'' tells us where the mistake is to be found.  

In the case of runtime errors you can use this work around.  Add this line: On Error Resume Next.  A better technique would have to employ error correcting code.

Try logging on as an Administrator, especially if your error says: Error: Type mismatch: 'Join'.  (My screen shot says Error: Type mismatch: 'CreateeObject' - clearly my error is a typo.  CreateObject.

If you are still stuck then a good script editor really would help this type of problem because it color codes the commands.  Free download of OnScript: http://www.computerperformance.co.uk/Logon/code/onscript.htm

Example 1 of Error 800A000D Script
Error: CreateeObject- Extra letter e.  Look on line 14.

Correction: CreateObject - Corrected, letter e removed

 

' MapNetworkDrive.vbs
' VBScript Error 800A000D to map a network drive.
' Author Guy Thomas http://computerperformance.co.uk/
' Version 2.2 - April 24th 2005
' --------------------------------------------------------'
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "J:"
strRemotePath = "\\alan\home"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result J: drive
Set objNetwork = CreateeObject("WScript.Network")

objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
WScript.Quit

' End of Example Error 800A000D VBScript.

Jerry[8D]

seduar

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Hal error 13
« Reply #2 on: July 07, 2006, 09:59:44 pm »
Thank you very much for the information Jerry.

i will try to figure this out.

Did you install the loneliness pluggin from scratch and if you did, did you have any problems?

For some reason in my computer did not work.

Thanks again for the info.

[:)]
 

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
Hal error 13
« Reply #3 on: July 08, 2006, 08:20:28 am »
Hi, seduar

I have answered you in the Virtual Humans Forum, but I copy my answer here, since it might be useful for other people too.

The only statement in the plugin, containing CDBL is the following:

        loPatience = CDbl(HalBrain.TopicSearch("PATIENCE", "lonelyParameter"))

So the problem comes probably from the fact that this parameter is not yet existing in the database.

In fact I made this test:

1. I removed the "lonelyparameter" table from my database
2. I activated the plugin without setting any value in these parameters:



3. In a few seconds I got this error, which I believe is the same you have:


4. I inserted some values in the two parameters and clicked on Apply changes:



5. Done! Now the table is created with numeric values and the statement does not get into error.




I have explained all this because I like to take a "teacher" approach. However the only thing you have to do is what is described at step # 4.

I hope this solves your problem.

Let me know if it works

Bye

« Last Edit: July 08, 2006, 02:55:42 pm by vrossi »

seduar

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Hal error 13
« Reply #4 on: July 08, 2006, 08:49:12 pm »
Yes, It did work.

Thank you very much vrossi.

That explains everything. There is nothing wrong with the Loneliness 4 pluggin, i just had to do what you told me to do.

Thanks again for taking your time to test the pluggin, now i can keep filling the brain up to enhence my Hal Valerie.

Changing the subject, did you ever checked out the virtual singer.
I am sure you can probably figure out a way to make it work with Hal.
[:D]