Microsoft VBScript runtime error '800a0006' Overflow

I need a solution to this problem, Ive tried many, many things.  Please let me know if you can solve it.

Microsoft VBScript runtime error '800a0006'


/wwf/forum_posts.asp, line 811

Line in question: FormatPercent(lngAuthorHP / lngAuthorMax_HP, 0)
Who is Participating?
KarcOriginConnect With a Mentor Commented:
Could you please send the values of  lngAuthorHP and lngAuthorMax_HP
I am waiting
try to store the expression   "  lngAuthorHP / lngAuthorMax_HP "       in a separate variable and use that variable inside the formatpercent() funtion
DIDD0Author Commented:
naw, now the problem is: strHPPercent = lngAuthorHP / lngAuthorMax_HP

I think its got something to do with the division function... weird...
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

DIDD0Author Commented:
0 and 0 for now
DIDD0Author Commented:
oh I gotcha thanxs, you solved it :D
Those values would cause a divide by zero error

If lngAuthorMax_HP = 0 Then
  variable = "0%"
  variable = FormatPercent(lngAuthorHP / lngAuthorMax_HP, 0)
End If
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.