faulty format

Max Tillberg

Member
Licensed User
Hi,
I am trying to use
Form2.DrawImage(RulerImage((OwnerOfState(AttackToStateNumber))), imageX0, imageY0, imageX, imageY)

defined as
Dim RulerImage(13) As String
Dim OwnerOfState(22) As Int16
RulerImage(1) = "image.bmp"
OwnerOfState(2) = 1
AttackToStateNumber = 2

but I get an error message like indatastring has a faulty format, any suggestions?

Sincerely,
Max Tillberg
 

klaus

Expert
Licensed User
You have too many parentheses:

You should replace:
Form2.DrawImage(RulerImage((OwnerOfState(AttackToS tateNumber))), imageX0, imageY0, imageX, imageY)

by
Form2.DrawImage(RulerImage(OwnerOfState(AttackToS tateNumber)), imageX0, imageY0, imageX, imageY)

Best regards.
 
Top