문제

I'm trying multiply discount_v times item_qty + total_discount but i keep getting the error Microsoft VBScript runtime error '800a000d' Type mismatch.

Can anyone tell me what I'm doing wrong, please! Here is the code I am using:

total_discount = (discount_v * item_qty) + total_discount
도움이 되었습니까?

해결책

Try this:

 total_discount = (CDbl(discount_v) * CInt(item_qty)) + CDbl(total_discount) 

Better yet use these type conversion functions when you initially assign the variables.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top