iam making a tic tac toe on QBasic but I have a problem with a function and i don't know fix it The error is "Expected ) on current line" but i don't know where put )
FUNCTION HayGanador() as string 'the error is on this line
FOR i = 1 TO 3
IF Tablero(i, 1) <> "" AND Tablero(i, 1) = Tablero(i, 2) AND Tablero(i, 1) = Tablero(i, 3) THEN
HayGanador = -1
EXIT FUNCTION
END IF
IF Tablero(1, i) <> "" AND Tablero(1, i) = Tablero(2, i) AND Tablero(1, i) = Tablero(3, i) THEN
HayGanador = -1
EXIT FUNCTION
END IF
NEXT i
IF Tablero(1, 1) <> "" AND Tablero(1, 1) = Tablero(2, 2) AND Tablero(1, 1) = Tablero(3, 3) THEN
HayGanador = -1
EXIT FUNCTION
END IF
IF Tablero(1, 3) <> "" AND Tablero(1, 3) = Tablero(2, 2) AND Tablero(1, 3) = Tablero(3, 1) THEN
HayGanador = -1
EXIT FUNCTION
END IF
HayGanador = 0
END FUNCTION
I was trying to enter a function that identifies the winner of the tic tac toe game but I don't know how to make this function a string