am doing a tic tac toe game, and I am having trouble with using the index of my array (the nine boxes) as x and y coordinates. I have done

Dim pictt(3,3) as integer

and used the format of picttt(x,y) in other places. I have separated out the x component of my array indexes with

x = Val(Left(Trim(Str(Index)), 1))

ut t i'm not quite sure about the y half, which is part of the problem. When i try to run the program, it highlights my "Dim picttt(3,3) as integer and says "member already exists in this form" I know I am missing something simple about this, but i'm new to programing and would appreciate a little help. Thank you smile.gif

9 Years
Discussion Span
Last Post by ChrLeigw

I've figured out how to get the y coordinate. it's

y = Val(Right(Trim(Index), 1))

now i've tried tons of different combinations in form load of defining picttt(3,3) as picttt(x,y) because i think that's what it doesn't like about my dim code? and all of them say wrong number of arguments or invalid property assignment. What am I doing wrong?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.